UNPKG

@noeldemartin/faker

Version:

Generate massive amounts of fake contextual data

10 lines (9 loc) 667 kB
var h=class extends Error{};function m(t){let e=`[@faker-js/faker]: ${t.deprecated} is deprecated`;t.since&&(e+=` since v${t.since}`),t.until&&(e+=` and will be removed in v${t.until}`),t.proposed&&(e+=`. Please use ${t.proposed} instead`),console.warn(`${e}.`)}var Qi=(a=>(a.female="female",a.male="male",a))(Qi||{}),oe=(a=>(a.Female="female",a.Male="male",a))(oe||{});function Z(t,e,{generic:a,female:i,male:n}={}){let r;switch(e){case"female":r=i;break;case"male":r=n;break;default:r=a;break}return r==null&&(i!=null&&n!=null?r=t.helpers.arrayElement([i,n]):r=a),t.helpers.arrayElement(r)}var j=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(j.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}firstName(e){let{first_name:a,female_first_name:i,male_first_name:n}=this.faker.definitions.name;return Z(this.faker,e,{generic:a,female:i,male:n})}lastName(e){let{last_name:a,female_last_name:i,male_last_name:n}=this.faker.definitions.name;return Z(this.faker,e,{generic:a,female:i,male:n})}middleName(e){let{middle_name:a,female_middle_name:i,male_middle_name:n}=this.faker.definitions.name;return Z(this.faker,e,{generic:a,female:i,male:n})}findName(e,a,i){return m({deprecated:"faker.name.findName()",proposed:"faker.name.fullName()",since:"7.4",until:"8.0"}),this.fullName({firstName:e,lastName:a,sex:i})}fullName(e={}){let{gender:a,sex:i=a||this.faker.helpers.arrayElement(["female","male"]),firstName:n=this.firstName(i),lastName:r=this.lastName(i)}=e;a&&m({deprecated:"faker.name.fullName({ gender: '...' })",proposed:"faker.name.fullName({ sex: '...' })",since:"7.4",until:"8.0"});let o=[],s=this.faker.helpers.maybe(()=>this.prefix(i),{probability:.125});s&&o.push(s),o.push(n),o.push(r);let p=this.faker.helpers.maybe(()=>this.suffix(),{probability:.125});return p&&o.push(p),o.join(" ")}gender(e){return e?(m({deprecated:"faker.name.gender(true)",proposed:"faker.name.sex()",since:"7.5",until:"8.0"}),this.faker.name.sex()):this.faker.helpers.arrayElement(this.faker.definitions.name.gender)}sex(){return this.faker.helpers.arrayElement(this.faker.definitions.name.sex)}sexType(){return this.faker.helpers.objectValue(oe)}prefix(e){let{prefix:a,female_prefix:i,male_prefix:n}=this.faker.definitions.name;return Z(this.faker,e,{generic:a,female:i,male:n})}suffix(){return this.faker.helpers.arrayElement(this.faker.definitions.name.suffix)}jobTitle(){return`${this.jobDescriptor()} ${this.jobArea()} ${this.jobType()}`}jobDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.name.title.descriptor)}jobArea(){return this.faker.helpers.arrayElement(this.faker.definitions.name.title.level)}jobType(){return this.faker.helpers.arrayElement(this.faker.definitions.name.title.job)}};var S=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(S.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}zipCode(e){if(e==null){let a=this.faker.definitions.address.postcode;typeof a=="string"?e=a:e=this.faker.helpers.arrayElement(a)}return this.faker.helpers.replaceSymbols(e)}zipCodeByState(e){var i;let a=(i=this.faker.definitions.address.postcode_by_state)==null?void 0:i[e];return a?String(this.faker.datatype.number(a)):this.zipCode()}city(e){e!=null&&m({deprecated:"faker.address.city(format)",proposed:"faker.address.city() or faker.helpers.fake(format)",since:"7.0",until:"8.0"});let a=this.faker.definitions.address.city;return typeof e!="number"&&(e=this.faker.datatype.number(a.length-1)),this.faker.helpers.fake(a[e])}cityPrefix(){return m({deprecated:"faker.address.cityPrefix()",proposed:"faker.address.city() or faker.fake('{{address.city_prefix}}')",since:"7.2",until:"8.0"}),this.faker.helpers.arrayElement(this.faker.definitions.address.city_prefix)}citySuffix(){return m({deprecated:"faker.address.citySuffix()",proposed:"faker.address.city() or faker.helpers.fake('{{address.city_suffix}}')",since:"7.2",until:"8.0"}),this.faker.helpers.arrayElement(this.faker.definitions.address.city_suffix)}cityName(){return this.faker.helpers.arrayElement(this.faker.definitions.address.city_name)}buildingNumber(){let e=this.faker.helpers.arrayElement(this.faker.definitions.address.building_number);return this.faker.helpers.replaceSymbolWithNumber(e)}street(){let e=this.faker.helpers.arrayElement(this.faker.definitions.address.street);return this.faker.helpers.fake(e)}streetName(){return this.faker.definitions.address.street_name==null?(m({deprecated:"faker.address.streetName() without address.street_name definitions",proposed:"faker.address.street() or provide address.street_name definitions",since:"7.0",until:"8.0"}),this.street()):this.faker.helpers.arrayElement(this.faker.definitions.address.street_name)}streetAddress(e=!1){let i=this.faker.definitions.address.street_address[e?"full":"normal"];return this.faker.helpers.fake(i)}streetSuffix(){return m({deprecated:"faker.address.streetSuffix()",proposed:"faker.address.street()",since:"7.4",until:"8.0"}),this.faker.helpers.arrayElement(this.faker.definitions.address.street_suffix)}streetPrefix(){return m({deprecated:"faker.address.streetPrefix()",proposed:"faker.address.street()",since:"7.4",until:"8.0"}),this.faker.helpers.arrayElement(this.faker.definitions.address.street_prefix)}secondaryAddress(){return this.faker.helpers.replaceSymbolWithNumber(this.faker.helpers.arrayElement(this.faker.definitions.address.secondary_address))}county(){return this.faker.helpers.arrayElement(this.faker.definitions.address.county)}country(){return this.faker.helpers.arrayElement(this.faker.definitions.address.country)}countryCode(e="alpha-2"){let a=e==="alpha-3"?"country_code_alpha_3":"country_code";return this.faker.helpers.arrayElement(this.faker.definitions.address[a])}state(){return this.faker.helpers.arrayElement(this.faker.definitions.address.state)}stateAbbr(){return this.faker.helpers.arrayElement(this.faker.definitions.address.state_abbr)}latitude(e=90,a=-90,i=4){return this.faker.datatype.number({min:a,max:e,precision:parseFloat(`${0 .toPrecision(i)}1`)}).toFixed(i)}longitude(e=180,a=-180,i=4){return this.faker.datatype.number({max:e,min:a,precision:parseFloat(`${0 .toPrecision(i)}1`)}).toFixed(i)}direction(e=!1){return e?this.faker.helpers.arrayElement(this.faker.definitions.address.direction_abbr):this.faker.helpers.arrayElement(this.faker.definitions.address.direction)}cardinalDirection(e=!1){return e?this.faker.helpers.arrayElement(this.faker.definitions.address.direction_abbr.slice(0,4)):this.faker.helpers.arrayElement(this.faker.definitions.address.direction.slice(0,4))}ordinalDirection(e=!1){return e?this.faker.helpers.arrayElement(this.faker.definitions.address.direction_abbr.slice(4,8)):this.faker.helpers.arrayElement(this.faker.definitions.address.direction.slice(4,8))}nearbyGPSCoordinate(e,a=10,i=!1){if(e===void 0)return[this.latitude(),this.longitude()];let n=this.faker.datatype.float({min:0,max:2*Math.PI,precision:1e-5}),r=i?a:a*1.60934,o=.995,s=this.faker.datatype.float({min:0,max:r,precision:.001})*o,p=4e4/360,c=s/p,l=[e[0]+Math.sin(n)*c,e[1]+Math.cos(n)*c];return l[0]=l[0]%180,(l[0]<-90||l[0]>90)&&(l[0]=Math.sign(l[0])*180-l[0],l[1]+=180),l[1]=(l[1]%360+540)%360-180,[l[0].toFixed(4),l[1].toFixed(4)]}timeZone(){return this.faker.helpers.arrayElement(this.faker.definitions.address.time_zone)}};var C=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(C.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}dog(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.dog)}cat(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cat)}snake(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.snake)}bear(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.bear)}lion(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.lion)}cetacean(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cetacean)}horse(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.horse)}bird(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.bird)}cow(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cow)}fish(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.fish)}crocodilia(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.crocodilia)}insect(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.insect)}rabbit(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.rabbit)}rodent(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.rodent)}type(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.type)}};var en=["sRGB","display-p3","rec2020","a98-rgb","prophoto-rgb","rec2020"],an=["rgb","rgba","hsl","hsla","hwb","cmyk","lab","lch","color"];function nn(t,e){switch(e==null?void 0:e.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break}return e!=null&&e.prefix&&(t=e.prefix+t),t}function te(t){return t.map(a=>{if(a%1!==0){let n=new ArrayBuffer(4);new DataView(n).setFloat32(0,a);let r=new Uint8Array(n);return te(Array.from(r)).split(" ").join("")}return(a>>>0).toString(2).padStart(8,"0")}).join(" ")}function rn(t,e="rgb",a="sRGB"){let i=n=>Math.round(n*100);switch(e){case"rgba":return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]})`;case"color":return`color(${a} ${t[0]} ${t[1]} ${t[2]})`;case"cmyk":return`cmyk(${i(t[0])}%, ${i(t[1])}%, ${i(t[2])}%, ${i(t[3])}%)`;case"hsl":return`hsl(${t[0]}deg ${i(t[1])}% ${i(t[2])}%)`;case"hsla":return`hsl(${t[0]}deg ${i(t[1])}% ${i(t[2])}% / ${i(t[3])})`;case"hwb":return`hwb(${t[0]} ${i(t[1])}% ${i(t[2])}%)`;case"lab":return`lab(${i(t[0])}% ${t[1]} ${t[2]})`;case"lch":return`lch(${i(t[0])}% ${t[1]} ${t[2]})`;case"rgb":default:return`rgb(${t[0]}, ${t[1]}, ${t[2]})`}}function k(t,e,a="rgb",i="sRGB"){switch(e){case"css":return rn(t,a,i);case"binary":return te(t);default:return t}}var _=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(_.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}human(){return this.faker.helpers.arrayElement(this.faker.definitions.color.human)}space(){return this.faker.helpers.arrayElement(this.faker.definitions.color.space)}cssSupportedFunction(){return this.faker.helpers.arrayElement(an)}cssSupportedSpace(){return this.faker.helpers.arrayElement(en)}rgb(e){let{format:a="hex",includeAlpha:i=!1,prefix:n="#",casing:r="lower"}=e||{};e={format:a,includeAlpha:i,prefix:n,casing:r};let o,s="rgb";return a==="hex"?(o=this.faker.datatype.hexadecimal({length:i?8:6,prefix:""}),o=nn(o,e),o):(o=Array.from({length:3}).map(()=>this.faker.datatype.number({min:0,max:255})),i&&(o.push(this.faker.datatype.float({min:0,max:1,precision:.01})),s="rgba"),k(o,a,s))}cmyk(e){let a=Array.from({length:4}).map(()=>this.faker.datatype.float({min:0,max:1,precision:.01}));return k(a,(e==null?void 0:e.format)||"decimal","cmyk")}hsl(e){let a=[this.faker.datatype.number({min:0,max:360})];for(let i=0;i<(e!=null&&e.includeAlpha?3:2);i++)a.push(this.faker.datatype.float({min:0,max:1,precision:.01}));return k(a,(e==null?void 0:e.format)||"decimal",e!=null&&e.includeAlpha?"hsla":"hsl")}hwb(e){let a=[this.faker.datatype.number({min:0,max:360})];for(let i=0;i<2;i++)a.push(this.faker.datatype.float({min:0,max:1,precision:.01}));return k(a,(e==null?void 0:e.format)||"decimal","hwb")}lab(e){let a=[this.faker.datatype.float({min:0,max:1,precision:1e-6})];for(let i=0;i<2;i++)a.push(this.faker.datatype.float({min:-100,max:100,precision:1e-4}));return k(a,(e==null?void 0:e.format)||"decimal","lab")}lch(e){let a=[this.faker.datatype.float({min:0,max:1,precision:1e-6})];for(let i=0;i<2;i++)a.push(this.faker.datatype.number({min:0,max:230,precision:.1}));return k(a,(e==null?void 0:e.format)||"decimal","lch")}colorByCSSColorSpace(e){(e==null?void 0:e.format)==="css"&&!(e!=null&&e.space)&&(e={...e,space:"sRGB"});let a=Array.from({length:3}).map(()=>this.faker.datatype.float({min:0,max:1,precision:1e-4}));return k(a,(e==null?void 0:e.format)||"decimal","color",e==null?void 0:e.space)}};var A=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(A.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}color(){return m({deprecated:"faker.commerce.color()",proposed:"faker.color.human()",since:"7.0",until:"8.0"}),this.faker.color.human()}department(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.department)}productName(){return`${this.productAdjective()} ${this.productMaterial()} ${this.product()}`}price(e=1,a=1e3,i=2,n=""){if(e<0||a<0)return`${n}${0}`;let r=this.faker.datatype.number({max:a,min:e});return n+(Math.round(r*Math.pow(10,i))/Math.pow(10,i)).toFixed(i)}productAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.adjective)}productMaterial(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.material)}product(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.product)}productDescription(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_description)}};var M=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(M.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}suffixes(){return this.faker.definitions.company.suffix.slice(0)}name(e){var n;e!=null&&m({deprecated:"faker.company.name(format)",proposed:"faker.company.name() or faker.helpers.fake(format)",since:"7.4",until:"8.0"});let a=["{{name.lastName}} {{company.companySuffix}}","{{name.lastName}} - {{name.lastName}}","{{name.lastName}}, {{name.lastName}} and {{name.lastName}}"],i=(n=this.faker.definitions.company.name_patterns)!=null?n:a;return typeof e!="number"&&(e=this.faker.datatype.number(i.length-1)),this.faker.helpers.fake(i[e])}companyName(e){return m({deprecated:"faker.company.companyName()",proposed:"faker.company.name()",since:"7.4",until:"8.0"}),this.name(e)}companySuffix(){return this.faker.helpers.arrayElement(this.suffixes())}catchPhrase(){return[this.catchPhraseAdjective(),this.catchPhraseDescriptor(),this.catchPhraseNoun()].join(" ")}bs(){return[this.bsBuzz(),this.bsAdjective(),this.bsNoun()].join(" ")}catchPhraseAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.company.adjective)}catchPhraseDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.company.descriptor)}catchPhraseNoun(){return this.faker.helpers.arrayElement(this.faker.definitions.company.noun)}bsAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.company.bs_adjective)}bsBuzz(){return this.faker.helpers.arrayElement(this.faker.definitions.company.bs_verb)}bsNoun(){return this.faker.helpers.arrayElement(this.faker.definitions.company.bs_noun)}};var B=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(B.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}column(){return this.faker.helpers.arrayElement(this.faker.definitions.database.column)}type(){return this.faker.helpers.arrayElement(this.faker.definitions.database.type)}collation(){return this.faker.helpers.arrayElement(this.faker.definitions.database.collation)}engine(){return this.faker.helpers.arrayElement(this.faker.definitions.database.engine)}mongodbObjectId(){return this.faker.datatype.hexadecimal({length:24,case:"lower",prefix:""})}};var T=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(T.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}number(e=99999){var o;typeof e=="number"&&(e={max:e});let{min:a=0,precision:i=1}=e,n=(o=e.max)!=null?o:a+99999;if(n===a)return a;if(n<a)throw new h(`Max ${n} should be greater than min ${a}.`);return Math.floor(this.faker.mersenne.rand(n/i+1,a/i))/(1/i)}float(e){typeof e=="number"&&(e={precision:e}),e=e||{};let a={};for(let i in e)a[i]=e[i];return a.precision==null&&(a.precision=.01),this.number(a)}datetime(e={}){let i=typeof e=="number"?void 0:e.min,n=typeof e=="number"?e:e.max;return(i==null||i<864e13*-1)&&(i=Date.UTC(1990,0)),(n==null||n>864e13)&&(n=Date.UTC(2100,0)),new Date(this.number({min:i,max:n}))}string(e=10){let a=Math.pow(2,20);e>=a&&(e=a);let i={min:33,max:125},n="";for(let r=0;r<e;r++)n+=String.fromCharCode(this.number(i));return n}uuid(){let e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",a=i=>{let n=this.number({min:0,max:15});return(i==="x"?n:n&3|8).toString(16)};return e.replace(/[xy]/g,a)}boolean(){return!!this.number(1)}hexadecimal(e={}){typeof e=="number"&&(m({deprecated:"faker.datatype.hexadecimal(length)",proposed:"faker.datatype.hexadecimal({ length })",since:"7.5",until:"8.0"}),e={length:e});let{length:a=1,prefix:i="0x",case:n="mixed"}=e,r="";for(let o=0;o<a;o++)r+=this.faker.helpers.arrayElement(["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"]);return n==="upper"?r=r.toUpperCase():n==="lower"&&(r=r.toLowerCase()),`${i}${r}`}json(){let e=["foo","bar","bike","a","b","name","prop"],a={};return e.forEach(i=>{a[i]=this.boolean()?this.string():this.number()}),JSON.stringify(a)}array(e=10){return Array.from({length:e}).map(()=>this.boolean()?this.string():this.number())}bigInt(e){var o,s;let a,i;if(typeof e=="object"?(a=BigInt((o=e.min)!=null?o:0),i=BigInt((s=e.max)!=null?s:a+BigInt(999999999999999))):(a=BigInt(0),i=BigInt(e!=null?e:999999999999999)),i===a)return a;if(i<a)throw new h(`Max ${i} should be larger then min ${a}.`);let n=i-a,r=BigInt(this.faker.random.numeric(n.toString(10).length,{allowLeadingZeros:!0}))%(n+BigInt(1));return a+r}};function x(t){return t=new Date(t),isNaN(t.valueOf())&&(t=new Date),t}var L=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(L.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}past(e,a){let i=x(a),n={min:1e3,max:(e||1)*365*24*3600*1e3},r=i.getTime();return r-=this.faker.datatype.number(n),i.setTime(r),i}future(e,a){let i=x(a),n={min:1e3,max:(e||1)*365*24*3600*1e3},r=i.getTime();return r+=this.faker.datatype.number(n),i.setTime(r),i}between(e,a){let i=x(e).getTime(),n=x(a).getTime(),r=this.faker.datatype.number(n-i);return new Date(i+r)}betweens(e,a,i=3){let n=[];for(;n.length<i;)n.push(this.between(e,a));return n.sort((r,o)=>r.getTime()-o.getTime())}recent(e,a){let i=x(a),n={min:1e3,max:(e||1)*24*3600*1e3},r=i.getTime();return r-=this.faker.datatype.number(n),i.setTime(r),i}soon(e,a){let i=x(a),n={min:1e3,max:(e||1)*24*3600*1e3},r=i.getTime();return r+=this.faker.datatype.number(n),i.setTime(r),i}month(e){var o,s;let a=(o=e==null?void 0:e.abbr)!=null?o:!1,i=(s=e==null?void 0:e.context)!=null?s:!1,n=this.faker.definitions.date.month,r;return a?i&&n.abbr_context!=null?r="abbr_context":r="abbr":i&&n.wide_context!=null?r="wide_context":r="wide",this.faker.helpers.arrayElement(n[r])}weekday(e){var o,s;let a=(o=e==null?void 0:e.abbr)!=null?o:!1,i=(s=e==null?void 0:e.context)!=null?s:!1,n=this.faker.definitions.date.weekday,r;return a?i&&n.abbr_context!=null?r="abbr_context":r="abbr":i&&n.wide_context!=null?r="wide_context":r="wide",this.faker.helpers.arrayElement(n[r])}birthdate(e={}){var s,p,c,l;let a=e.mode==="age"?"age":"year",i=x(e.refDate),n=i.getUTCFullYear(),r,o;if(a==="age"?(r=new Date(i).setUTCFullYear(n-((s=e.max)!=null?s:80)-1),o=new Date(i).setUTCFullYear(n-((p=e.min)!=null?p:18))):(r=new Date(Date.UTC(0,0,2)).setUTCFullYear((c=e.min)!=null?c:n-80),o=new Date(Date.UTC(0,11,30)).setUTCFullYear((l=e.max)!=null?l:n-18)),o<r)throw new h(`Max ${o} should be larger then min ${r}.`);return new Date(this.faker.datatype.number({min:r,max:o}))}};var R=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(R.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}fake(e){return m({deprecated:"faker.fake()",proposed:"faker.helpers.fake()",since:"7.4",until:"8.0"}),this.faker.helpers.fake(e)}};var on={alpha:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],formats:[{country:"AL",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"ALkk bbbs sssx cccc cccc cccc cccc"},{country:"AD",total:24,bban:[{type:"n",count:8},{type:"c",count:12}],format:"ADkk bbbb ssss cccc cccc cccc"},{country:"AT",total:20,bban:[{type:"n",count:5},{type:"n",count:11}],format:"ATkk bbbb bccc cccc cccc"},{country:"AZ",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"AZkk bbbb cccc cccc cccc cccc cccc"},{country:"BH",total:22,bban:[{type:"a",count:4},{type:"c",count:14}],format:"BHkk bbbb cccc cccc cccc cc"},{country:"BE",total:16,bban:[{type:"n",count:3},{type:"n",count:9}],format:"BEkk bbbc cccc ccxx"},{country:"BA",total:20,bban:[{type:"n",count:6},{type:"n",count:10}],format:"BAkk bbbs sscc cccc ccxx"},{country:"BR",total:29,bban:[{type:"n",count:13},{type:"n",count:10},{type:"a",count:1},{type:"c",count:1}],format:"BRkk bbbb bbbb ssss sccc cccc ccct n"},{country:"BG",total:22,bban:[{type:"a",count:4},{type:"n",count:6},{type:"c",count:8}],format:"BGkk bbbb ssss ddcc cccc cc"},{country:"CR",total:22,bban:[{type:"n",count:1},{type:"n",count:3},{type:"n",count:14}],format:"CRkk xbbb cccc cccc cccc cc"},{country:"HR",total:21,bban:[{type:"n",count:7},{type:"n",count:10}],format:"HRkk bbbb bbbc cccc cccc c"},{country:"CY",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"CYkk bbbs ssss cccc cccc cccc cccc"},{country:"CZ",total:24,bban:[{type:"n",count:10},{type:"n",count:10}],format:"CZkk bbbb ssss sscc cccc cccc"},{country:"DK",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"DKkk bbbb cccc cccc cc"},{country:"DO",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"DOkk bbbb cccc cccc cccc cccc cccc"},{country:"TL",total:23,bban:[{type:"n",count:3},{type:"n",count:16}],format:"TLkk bbbc cccc cccc cccc cxx"},{country:"EE",total:20,bban:[{type:"n",count:4},{type:"n",count:12}],format:"EEkk bbss cccc cccc cccx"},{country:"FO",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"FOkk bbbb cccc cccc cx"},{country:"FI",total:18,bban:[{type:"n",count:6},{type:"n",count:8}],format:"FIkk bbbb bbcc cccc cx"},{country:"FR",total:27,bban:[{type:"n",count:10},{type:"c",count:11},{type:"n",count:2}],format:"FRkk bbbb bggg ggcc cccc cccc cxx"},{country:"GE",total:22,bban:[{type:"a",count:2},{type:"n",count:16}],format:"GEkk bbcc cccc cccc cccc cc"},{country:"DE",total:22,bban:[{type:"n",count:8},{type:"n",count:10}],format:"DEkk bbbb bbbb cccc cccc cc"},{country:"GI",total:23,bban:[{type:"a",count:4},{type:"c",count:15}],format:"GIkk bbbb cccc cccc cccc ccc"},{country:"GR",total:27,bban:[{type:"n",count:7},{type:"c",count:16}],format:"GRkk bbbs sssc cccc cccc cccc ccc"},{country:"GL",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"GLkk bbbb cccc cccc cc"},{country:"GT",total:28,bban:[{type:"c",count:4},{type:"c",count:4},{type:"c",count:16}],format:"GTkk bbbb mmtt cccc cccc cccc cccc"},{country:"HU",total:28,bban:[{type:"n",count:8},{type:"n",count:16}],format:"HUkk bbbs sssk cccc cccc cccc cccx"},{country:"IS",total:26,bban:[{type:"n",count:6},{type:"n",count:16}],format:"ISkk bbbb sscc cccc iiii iiii ii"},{country:"IE",total:22,bban:[{type:"c",count:4},{type:"n",count:6},{type:"n",count:8}],format:"IEkk aaaa bbbb bbcc cccc cc"},{country:"IL",total:23,bban:[{type:"n",count:6},{type:"n",count:13}],format:"ILkk bbbn nncc cccc cccc ccc"},{country:"IT",total:27,bban:[{type:"a",count:1},{type:"n",count:10},{type:"c",count:12}],format:"ITkk xaaa aabb bbbc cccc cccc ccc"},{country:"JO",total:30,bban:[{type:"a",count:4},{type:"n",count:4},{type:"n",count:18}],format:"JOkk bbbb nnnn cccc cccc cccc cccc cc"},{country:"KZ",total:20,bban:[{type:"n",count:3},{type:"c",count:13}],format:"KZkk bbbc cccc cccc cccc"},{country:"XK",total:20,bban:[{type:"n",count:4},{type:"n",count:12}],format:"XKkk bbbb cccc cccc cccc"},{country:"KW",total:30,bban:[{type:"a",count:4},{type:"c",count:22}],format:"KWkk bbbb cccc cccc cccc cccc cccc cc"},{country:"LV",total:21,bban:[{type:"a",count:4},{type:"c",count:13}],format:"LVkk bbbb cccc cccc cccc c"},{country:"LB",total:28,bban:[{type:"n",count:4},{type:"c",count:20}],format:"LBkk bbbb cccc cccc cccc cccc cccc"},{country:"LI",total:21,bban:[{type:"n",count:5},{type:"c",count:12}],format:"LIkk bbbb bccc cccc cccc c"},{country:"LT",total:20,bban:[{type:"n",count:5},{type:"n",count:11}],format:"LTkk bbbb bccc cccc cccc"},{country:"LU",total:20,bban:[{type:"n",count:3},{type:"c",count:13}],format:"LUkk bbbc cccc cccc cccc"},{country:"MK",total:19,bban:[{type:"n",count:3},{type:"c",count:10},{type:"n",count:2}],format:"MKkk bbbc cccc cccc cxx"},{country:"MT",total:31,bban:[{type:"a",count:4},{type:"n",count:5},{type:"c",count:18}],format:"MTkk bbbb ssss sccc cccc cccc cccc ccc"},{country:"MR",total:27,bban:[{type:"n",count:10},{type:"n",count:13}],format:"MRkk bbbb bsss sscc cccc cccc cxx"},{country:"MU",total:30,bban:[{type:"a",count:4},{type:"n",count:4},{type:"n",count:15},{type:"a",count:3}],format:"MUkk bbbb bbss cccc cccc cccc 000d dd"},{country:"MC",total:27,bban:[{type:"n",count:10},{type:"c",count:11},{type:"n",count:2}],format:"MCkk bbbb bsss sscc cccc cccc cxx"},{country:"MD",total:24,bban:[{type:"c",count:2},{type:"c",count:18}],format:"MDkk bbcc cccc cccc cccc cccc"},{country:"ME",total:22,bban:[{type:"n",count:3},{type:"n",count:15}],format:"MEkk bbbc cccc cccc cccc xx"},{country:"NL",total:18,bban:[{type:"a",count:4},{type:"n",count:10}],format:"NLkk bbbb cccc cccc cc"},{country:"NO",total:15,bban:[{type:"n",count:4},{type:"n",count:7}],format:"NOkk bbbb cccc ccx"},{country:"PK",total:24,bban:[{type:"a",count:4},{type:"n",count:16}],format:"PKkk bbbb cccc cccc cccc cccc"},{country:"PS",total:29,bban:[{type:"c",count:4},{type:"n",count:9},{type:"n",count:12}],format:"PSkk bbbb xxxx xxxx xccc cccc cccc c"},{country:"PL",total:28,bban:[{type:"n",count:8},{type:"n",count:16}],format:"PLkk bbbs sssx cccc cccc cccc cccc"},{country:"PT",total:25,bban:[{type:"n",count:8},{type:"n",count:13}],format:"PTkk bbbb ssss cccc cccc cccx x"},{country:"QA",total:29,bban:[{type:"a",count:4},{type:"c",count:21}],format:"QAkk bbbb cccc cccc cccc cccc cccc c"},{country:"RO",total:24,bban:[{type:"a",count:4},{type:"c",count:16}],format:"ROkk bbbb cccc cccc cccc cccc"},{country:"SM",total:27,bban:[{type:"a",count:1},{type:"n",count:10},{type:"c",count:12}],format:"SMkk xaaa aabb bbbc cccc cccc ccc"},{country:"SA",total:24,bban:[{type:"n",count:2},{type:"c",count:18}],format:"SAkk bbcc cccc cccc cccc cccc"},{country:"RS",total:22,bban:[{type:"n",count:3},{type:"n",count:15}],format:"RSkk bbbc cccc cccc cccc xx"},{country:"SK",total:24,bban:[{type:"n",count:10},{type:"n",count:10}],format:"SKkk bbbb ssss sscc cccc cccc"},{country:"SI",total:19,bban:[{type:"n",count:5},{type:"n",count:10}],format:"SIkk bbss sccc cccc cxx"},{country:"ES",total:24,bban:[{type:"n",count:10},{type:"n",count:10}],format:"ESkk bbbb gggg xxcc cccc cccc"},{country:"SE",total:24,bban:[{type:"n",count:3},{type:"n",count:17}],format:"SEkk bbbc cccc cccc cccc cccc"},{country:"CH",total:21,bban:[{type:"n",count:5},{type:"c",count:12}],format:"CHkk bbbb bccc cccc cccc c"},{country:"TN",total:24,bban:[{type:"n",count:5},{type:"n",count:15}],format:"TNkk bbss sccc cccc cccc cccc"},{country:"TR",total:26,bban:[{type:"n",count:5},{type:"n",count:1},{type:"n",count:16}],format:"TRkk bbbb bxcc cccc cccc cccc cc"},{country:"AE",total:23,bban:[{type:"n",count:3},{type:"n",count:16}],format:"AEkk bbbc cccc cccc cccc ccc"},{country:"GB",total:22,bban:[{type:"a",count:4},{type:"n",count:6},{type:"n",count:8}],format:"GBkk bbbb ssss sscc cccc cc"},{country:"VG",total:24,bban:[{type:"c",count:4},{type:"n",count:16}],format:"VGkk bbbb cccc cccc cccc cccc"}],iso3166:["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],mod97:t=>{let e=0;for(let a=0;a<t.length;a++)e=(e*10+ +t[a])%97;return e},pattern10:["01","02","03","04","05","06","07","08","09"],pattern100:["001","002","003","004","005","006","007","008","009"],toDigitString:t=>t.replace(/[A-Z]/gi,e=>String(e.toUpperCase().charCodeAt(0)-55))},b=on;var D=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(D.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}account(e){e=e||8;let a="";for(let i=0;i<e;i++)a+="#";return e=null,this.faker.helpers.replaceSymbolWithNumber(a)}accountName(){return[this.faker.helpers.arrayElement(this.faker.definitions.finance.account_type),"Account"].join(" ")}routingNumber(){let e=this.faker.helpers.replaceSymbolWithNumber("########"),a=0;for(let i=0;i<e.length;i+=3)a+=Number(e[i])*3,a+=Number(e[i+1])*7,a+=Number(e[i+2])||0;return`${e}${Math.ceil(a/10)*10-a}`}mask(e,a,i){e=e||4,a=a==null?!0:a,i=i==null?!0:i;let n="";for(let r=0;r<e;r++)n=`${n}#`;return n=i?["...",n].join(""):n,n=a?["(",n,")"].join(""):n,n=this.faker.helpers.replaceSymbolWithNumber(n),n}amount(e=0,a=1e3,i=2,n="",r){let o=this.faker.datatype.number({max:a,min:e,precision:Math.pow(10,-i)}),s;return r?s=o.toLocaleString(void 0,{minimumFractionDigits:i}):s=o.toFixed(i),n+s}transactionType(){return this.faker.helpers.arrayElement(this.faker.definitions.finance.transaction_type)}currencyCode(){return this.faker.helpers.objectValue(this.faker.definitions.finance.currency).code}currencyName(){return this.faker.helpers.objectKey(this.faker.definitions.finance.currency)}currencySymbol(){let e;for(;!e;)e=this.faker.helpers.objectValue(this.faker.definitions.finance.currency).symbol;return e}bitcoinAddress(){let e=this.faker.datatype.number({min:25,max:39}),a=this.faker.helpers.arrayElement(["1","3"]);return a+=this.faker.random.alphaNumeric(e,{casing:"mixed",bannedChars:"0OIl"}),a}litecoinAddress(){let e=this.faker.datatype.number({min:26,max:33}),a=this.faker.helpers.arrayElement(["L","M","3"]);for(let i=0;i<e-1;i++)a+=this.faker.helpers.arrayElement("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ".split(""));return a}creditCardNumber(e=""){let a,i=this.faker.definitions.finance.credit_card,n=e.toLowerCase();if(n in i)a=this.faker.helpers.arrayElement(i[n]);else if(e.match(/#/))a=e;else{let r=this.faker.helpers.objectValue(i);a=this.faker.helpers.arrayElement(r)}return a=a.replace(/\//g,""),this.faker.helpers.replaceCreditCardSymbols(a)}creditCardCVV(){let e="";for(let a=0;a<3;a++)e+=this.faker.datatype.number({max:9}).toString();return e}creditCardIssuer(){return this.faker.helpers.objectKey(this.faker.definitions.finance.credit_card)}pin(e=4){if(e<1)throw new h("minimum length is 1");return Array.from({length:e},()=>this.faker.datatype.number(9)).join("")}ethereumAddress(){return this.faker.datatype.hexadecimal({length:40,case:"lower"})}iban(e=!1,a){let i=a?b.formats.find(p=>p.country===a):this.faker.helpers.arrayElement(b.formats);if(!i)throw new h(`Country code ${a} not supported.`);let n="",r=0;for(let p of i.bban){let c=p.count;for(r+=p.count;c>0;)p.type==="a"?n+=this.faker.helpers.arrayElement(b.alpha):p.type==="c"?this.faker.datatype.number(100)<80?n+=this.faker.datatype.number(9):n+=this.faker.helpers.arrayElement(b.alpha):c>=3&&this.faker.datatype.number(100)<30?this.faker.datatype.boolean()?(n+=this.faker.helpers.arrayElement(b.pattern100),c-=2):(n+=this.faker.helpers.arrayElement(b.pattern10),c--):n+=this.faker.datatype.number(9),c--;n=n.substring(0,r)}let o=98-b.mod97(b.toDigitString(`${n}${i.country}00`));o<10&&(o=`0${o}`);let s=`${i.country}${o}${n}`;return e?s.match(/.{1,4}/g).join(" "):s}bic(e={}){let{includeBranchCode:a=this.faker.datatype.boolean()}=e,i=this.faker.random.alpha({count:4,casing:"upper"}),n=this.faker.helpers.arrayElement(b.iso3166),r=this.faker.random.alphaNumeric(2,{casing:"upper"}),o=a?this.faker.datatype.boolean()?this.faker.random.alphaNumeric(3,{casing:"upper"}):"XXX":"";return`${i}${n}${r}${o}`}transactionDescription(){let e=this.amount(),a=this.faker.company.name(),i=this.transactionType(),n=this.account(),r=this.mask(),o=this.currencyCode();return`${i} transaction at ${a} using card ending with ***${r} for ${o} ${e} in account ***${n}`}};var z=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(z.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}branch(){let e=this.faker.hacker.noun().replace(" ","-"),a=this.faker.hacker.verb().replace(" ","-");return`${e}-${a}`}commitEntry(e={}){let{merge:a=this.faker.datatype.number({min:0,max:4})===0,eol:i="CRLF"}=e,n=[`commit ${this.faker.git.commitSha()}`];a&&n.push(`Merge: ${this.shortSha()} ${this.shortSha()}`),n.push(`Author: ${this.faker.name.firstName()} ${this.faker.name.lastName()} <${this.faker.internet.email()}>`,`Date: ${this.faker.date.recent().toString()}`,"",`\xA0\xA0\xA0\xA0${this.commitMessage()}`,"");let r=i==="CRLF"?`\r `:` `;return n.join(r)}commitMessage(){return`${this.faker.hacker.verb()} ${this.faker.hacker.adjective()} ${this.faker.hacker.noun()}`}commitSha(){return this.faker.datatype.hexadecimal({length:40,case:"lower",prefix:""})}shortSha(){return this.faker.datatype.hexadecimal({length:7,case:"lower",prefix:""})}};var E=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(E.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}abbreviation(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.abbreviation)}adjective(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.adjective)}noun(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.noun)}verb(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.verb)}ingverb(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.ingverb)}phrase(){let e={abbreviation:this.abbreviation,adjective:this.adjective,ingverb:this.ingverb,noun:this.noun,verb:this.verb},a=this.faker.helpers.arrayElement(this.faker.definitions.hacker.phrase);return this.faker.helpers.mustache(a,e)}};function se(t){let e=tn(t.replace(/L?$/,"0"));return e===0?0:10-e}function tn(t){t=t.replace(/[\s-]/g,"");let e=0,a=!1;for(let i=t.length-1;i>=0;i--){let n=parseInt(t.substring(i,i+1));a&&(n*=2,n>9&&(n=n%10+1)),e+=n,a=!a}return e%10}var sn={},ln=[];function cn(t,e){return t[e]===void 0?-1:0}function le(t,e,a,i,n){throw console.error("Error",a),console.log(`Found ${Object.keys(i).length} unique entries before throwing error. retried: ${n} total time: ${e-t}ms`),new h(`${a} for uniqueness check. May not be able to generate any more unique values with current settings. Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}function ne(t,e,a={}){var u;let i=new Date().getTime(),{startTime:n=new Date().getTime(),maxTime:r=50,maxRetries:o=50,compare:s=cn,store:p=sn}=a,{exclude:c=ln}=a;if(a.currentIterations=(u=a.currentIterations)!=null?u:0,Array.isArray(c)||(c=[c]),i-n>=r)return le(n,i,`Exceeded maxTime: ${r}`,p,a.currentIterations);if(a.currentIterations>=o)return le(n,i,`Exceeded maxRetries: ${o}`,p,a.currentIterations);let l=t.apply(this,e);return s(p,l)===-1&&c.indexOf(l)===-1?(p[l]=l,a.currentIterations=0,l):(a.currentIterations++,ne(t,e,{...a,startTime:n,maxTime:r,maxRetries:o,compare:s,exclude:c}))}var P=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(P.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}slugify(e=""){return e.replace(/ /g,"-").replace(/[^\一-龠\ぁ-ゔ\ァ-ヴー\w\.\-]+/g,"")}replaceSymbolWithNumber(e="",a="#"){let i="";for(let n=0;n<e.length;n++)e.charAt(n)===a?i+=this.faker.datatype.number(9):e.charAt(n)==="!"?i+=this.faker.datatype.number({min:2,max:9}):i+=e.charAt(n);return i}replaceSymbols(e=""){let a=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],i="";for(let n=0;n<e.length;n++)e.charAt(n)==="#"?i+=this.faker.datatype.number(9):e.charAt(n)==="?"?i+=this.arrayElement(a):e.charAt(n)==="*"?i+=this.faker.datatype.boolean()?this.arrayElement(a):this.faker.datatype.number(9):i+=e.charAt(n);return i}replaceCreditCardSymbols(e="6453-####-####-####-###L",a="#"){e=this.regexpStyleStringParse(e),e=this.replaceSymbolWithNumber(e,a);let i=se(e);return e.replace("L",String(i))}repeatString(e="",a=0){return m({deprecated:"faker.helpers.repeatString()",proposed:"String.prototype.repeat()",since:"7.5",until:"8.0"}),e.repeat(a)}regexpStyleStringParse(e=""){let a=/(.)\{(\d+)\,(\d+)\}/,i=/(.)\{(\d+)\}/,n=/\[(\d+)\-(\d+)\]/,r,o,s,p,c=e.match(a);for(;c!=null;)r=parseInt(c[2]),o=parseInt(c[3]),r>o&&(s=o,o=r,r=s),p=this.faker.datatype.number({min:r,max:o}),e=e.slice(0,c.index)+c[1].repeat(p)+e.slice(c.index+c[0].length),c=e.match(a);for(c=e.match(i);c!=null;)p=parseInt(c[2]),e=e.slice(0,c.index)+c[1].repeat(p)+e.slice(c.index+c[0].length),c=e.match(i);for(c=e.match(n);c!=null;)r=parseInt(c[1]),o=parseInt(c[2]),r>o&&(s=o,o=r,r=s),e=e.slice(0,c.index)+this.faker.datatype.number({min:r,max:o}).toString()+e.slice(c.index+c[0].length),c=e.match(n);return e}shuffle(e){if(e==null||e.length===0)return e||[];for(let a=e.length-1;a>0;--a){let i=this.faker.datatype.number(a),n=e[a];e[a]=e[i],e[i]=n}return e}uniqueArray(e,a){if(Array.isArray(e)){let n=new Set(e),r=Array.from(n);return this.shuffle(r).splice(0,a)}let i=new Set;try{if(typeof e=="function")for(;i.size<a;)i.add(e())}catch{}return Array.from(i)}mustache(e,a){if(e==null)return"";for(let i in a){let n=new RegExp(`{{${i}}}`,"g"),r=a[i];e=e.replace(n,r)}return e}maybe(e,a={}){let{probability:i=.5}=a;if(this.faker.datatype.float({min:0,max:1})<i)return e()}objectKey(e){let a=Object.keys(e);return this.arrayElement(a)}objectValue(e){let a=this.faker.helpers.objectKey(e);return e[a]}arrayElement(e=["a","b","c"]){let a=e.length>1?this.faker.datatype.number({max:e.length-1}):0;return e[a]}arrayElements(e=["a","b","c"],a){typeof a!="number"?a=e.length===0?0:this.faker.datatype.number({min:1,max:e.length}):a>e.length?a=e.length:a<0&&(a=0);let i=e.slice(0),n=e.length,r=n-a,o,s;for(;n-- >r;)s=Math.floor((n+1)*this.faker.datatype.float({min:0,max:.99})),o=i[s],i[s]=i[n],i[n]=o;return i.slice(r)}fake(e){if(typeof e!="string"||e.length===0)throw new h("string parameter is required!");let a=e.search(/{{[a-z]/),i=e.indexOf("}}",a);if(a===-1||i===-1)return e;let r=e.substring(a+2,i+2).replace("}}","").replace("{{",""),o=/\(([^)]+)\)/,s=o.exec(r),p="";s&&(r=r.replace(o,""),p=s[1]);let c=r.split("."),l=this.faker,u=this.faker.definitions;for(let w of c)l=l==null?void 0:l[w],u=u==null?void 0:u[w];let d;if(typeof l=="function")d=l;else if(Array.isArray(u))d=()=>this.faker.helpers.arrayElement(u);else throw new h(`Invalid module method or definition: ${r} - faker.${r} is not a function - faker.definitions.${r} is not an array`);d=d.bind(this);let g;try{g=JSON.parse(p)}catch{g=p}let f;typeof g=="string"&&g.length===0?f=String(d()):f=String(d(g));let v=e.substring(0,a)+f+e.substring(i+2);return v===""?"":this.fake(v)}unique(e,a,i={}){let{maxTime:n=50,maxRetries:r=50}=i;return ne(e,a,{...i,startTime:new Date().getTime(),maxTime:n,maxRetries:r,currentIterations:0})}};var X=class{constructor(e){this.faker=e}image(e,a,i,n){return this.imageUrl(e,a,i,n)}imageGrayscale(e,a,i){return this.imageUrl(e,a,i)}imageBlurred(e,a,i){return this.imageUrl(e,a,void 0,i)}imageRandomSeeded(e,a,i,n,r){return this.imageUrl(e,a,i,n,r)}avatar(){return m({deprecated:"faker.image.lorempicsum.avatar()",proposed:"faker.internet.avatar()",since:"7.3",until:"8.0"}),this.faker.internet.avatar()}imageUrl(e,a,i,n,r){e=e||640,a=a||480;let o="https://picsum.photos";return r&&(o+=`/seed/${r}`),o+=`/${e}/${a}`,i&&n?`${o}?grayscale&blur=${n}`:i?`${o}?grayscale`:n?`${o}?blur=${n}`:o}};var Q=class{constructor(e){this.faker=e}image(e,a,i){let n=["abstract","animals","business","cats","city","food","nightlife","fashion","people","nature","sports","technics","transport"];return this[this.faker.helpers.arrayElement(n)](e,a,i)}avatar(){return m({deprecated:"faker.image.lorempixel.avatar()",proposed:"faker.internet.avatar()",since:"7.3",until:"8.0"}),this.faker.internet.avatar()}imageUrl(e,a,i,n){e=e||640,a=a||480;let r=`https://lorempixel.com/${e}/${a}`;return i!=null&&(r+=`/${i}`),n&&(r+=`?${this.faker.datatype.number()}`),r}abstract(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"abstract",i)}animals(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"animals",i)}business(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"business",i)}cats(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"cats",i)}city(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"city",i)}food(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"food",i)}nightlife(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"nightlife",i)}fashion(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"fashion",i)}people(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"people",i)}nature(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"nature",i)}sports(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"sports",i)}technics(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"technics",i)}transport(e,a,i){return this.faker.image.lorempixel.imageUrl(e,a,"transport",i)}};var G=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(G.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}imageUrl(e,a,i,n,r,o){e=e||640,a=a||e;let s="https://via.placeholder.com";if(s+=`/${e}x${a}`,r!=null&&(s+=`/${r.replace("#","").toUpperCase()}`,o!=null&&(s+=`/${o.replace("#","").toUpperCase()}`)),n!=null&&(s+=`.${n}`),i!=null){let p=new URLSearchParams({text:i});s+=`?${p.toString()}`}return s}randomUrl(e,a,i){return this.imageUrl(e,a,this.faker.lorem.word(),i,this.faker.color.rgb({casing:"upper",prefix:""}),this.faker.color.rgb({casing:"upper",prefix:""}))}};var ee=class{constructor(e){this.faker=e}get categories(){return m({deprecated:"faker.image.unsplash.categories",since:"7.3",until:"8.0"}),["food","nature","people","technology","objects","buildings"]}image(e,a,i){return this.imageUrl(e,a,void 0,i)}avatar(){return m({deprecated:"faker.image.unsplash.avatar()",proposed:"faker.internet.avatar()",since:"7.3",until:"8.0"}),this.faker.internet.avatar()}imageUrl(e,a,i,n){e=e||640,a=a||480;let r="https://source.unsplash.com";return i!=null&&(r+=`/category/${i}`),r+=`/${e}x${a}`,n!=null&&/^([A-Za-z0-9].+,[A-Za-z0-9]+)$|^([A-Za-z0-9]+)$/.test(n)&&(r+=`?${n}`),r}food(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"food",i)}people(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"people",i)}nature(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"nature",i)}technology(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"technology",i)}objects(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"objects",i)}buildings(e,a,i){return this.faker.image.unsplash.imageUrl(e,a,"buildings",i)}};var H=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(H.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this));this.lorempixel=new Q(this.faker),this.unsplash=new ee(this.faker),this.lorempicsum=new X(this.faker),this.placeholder=new G(this.faker)}image(e,a,i){let n=["abstract","animals","business","cats","city","food","nightlife","fashion","people","nature","sports","technics","transport"];return this[this.faker.helpers.arrayElement(n)](e,a,i)}avatar(){return this.faker.internet.avatar()}imageUrl(e,a,i,n){e=e||640,a=a||480;let r=`https://loremflickr.com/${e}/${a}`;return i!=null&&(r+=`/${i}`),n&&(r+=`?lock=${this.faker.datatype.number()}`),r}abstract(e,a,i){return this.imageUrl(e,a,"abstract",i)}animals(e,a,i){return this.imageUrl(e,a,"animals",i)}business(e,a,i){return this.imageUrl(e,a,"business",i)}cats(e,a,i){return this.imageUrl(e,a,"cats",i)}city(e,a,i){return this.imageUrl(e,a,"city",i)}food(e,a,i){return this.imageUrl(e,a,"food",i)}nightlife(e,a,i){return this.imageUrl(e,a,"nightlife",i)}fashion(e,a,i){return this.imageUrl(e,a,"fashion",i)}people(e,a,i){return this.imageUrl(e,a,"people",i)}nature(e,a,i){return this.imageUrl(e,a,"nature",i)}sports(e,a,i){return this.imageUrl(e,a,"sports",i)}technics(e,a,i){return this.imageUrl(e,a,"technics",i)}transport(e,a,i){return this.imageUrl(e,a,"transport",i)}dataUri(e,a,i="grey"){let n=`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="${e}" height="${a}"><rect width="100%" height="100%" fill="${i}"/><text x="${e/2}" y="${a/2}" font-size="20" alignment-baseline="middle" text-anchor="middle" fill="white">${e}x${a}</text></svg>`;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(n)}};function ce(t){let e=l=>{let u=t.datatype.number({min:0,max:100})/100,d=0,g=0,f;for(let v in l)if(Object.prototype.hasOwnProperty.call(l,v)){if(g=l[v]+d,f=v,u>=d&&u<=g)break;d=d+l[v]}return f},a=()=>t.helpers.arrayElement(["AB","AF","AN","AR","AS","AZ","BE","BG","BN","BO","BR","BS","CA","CE","CO","CS","CU","CY","DA","DE","EL","EN","EO","ES","ET","EU","FA","FI","FJ","FO","FR","FY","GA","GD","GL","GV","HE","HI","HR","HT","HU","HY","ID","IS","IT","JA","JV","KA","KG","KO","KU","KW","KY","LA","LB","LI","LN","LT","LV","MG","MK","MN","MO","MS","MT","MY","NB","NE","NL","NN","NO","OC","PL","PT","RM","RO","RU","SC","SE","SK","SL","SO","SQ","SR","SV","SW","TK","TR","TY","UK","UR","UZ","VI","VO","YI","ZH"]),i=()=>{let l=e({chrome:.45132810566,iexplorer:.27477061836,firefox:.19384170608,safari:.06186781118,opera:.01574236955}),u=e({chrome:{win:.89,mac:.09,lin:.02},firefox:{win:.83,mac:.16,lin:.01},opera:{win:.91,mac:.03,lin:.06},safari:{win:.04,mac:.96},iexplorer:{win:1}}[l]);return[l,u]},n=l=>{let d={lin:["i686","x86_64"],mac:{Intel:.48,PPC:.01,"U; Intel":.48,"U; PPC":.01},win:["","WOW64","Win64; x64"]}[l];return Array.isArray(d)?t.helpers.arrayElement(d):e(d)},r=l=>{let u="";for(let d=0;d<l;d++)u+=`.${t.datatype.number({min:0,max:9})}`;return u},o={net(){return[t.datatype.number({min:1,max:4}),t.datatype.number({min:0,max:9}),t.datatype.number({min:1e4,max:99999}),t.datatype.number({min:0,max:9})].join(".")},nt(){return[t.datatype.number({min:5,max:6}),t.datatype.number({min:0,max:3})].join(".")},ie(){return t.datatype.number({min:7,max:11})},trident(){return[t.datatype.number({min:3,max:7}),t.datatype.number({min:0,max:1})].join(".")},osx(l){return[10,t.datatype.number({min:5,max:10}),t.datatype.number({min:0,max:9})].join(l||".")},chrome(){return[t.datatype.number({min:13,max:39}),0,t.datatype.number({min:800,max:899}),0].join(".")},presto(){return`2.9.${t.datatype.number({min:160,max:190})}`},presto2(){return`${t.datatype.number({min:10,max:12})}.00`},safari(){return[t.datatype.number({min:531,max:538}),t.datatype.number({min:0,max:2}),t.datatype.number({min:0,max:2})].join(".")}},s={firefox(l){let u=`${t.datatype.number({min:5,max:15})}${r(2)}`,d=`Gecko/20100101 Firefox/${u}`,g=n(l);return`Mozilla/5.0 ${l==="win"?`(Windows NT ${o.nt()}${g?`; ${g}`:""}`:l==="mac"?`(Macintosh; ${g} Mac OS X ${o.osx()}`:`(X11; Linux ${g}`}; rv:${u.slice(0,-2)}) ${d}`},iexplorer(){let l=o.ie();return l>=11?`Mozilla/5.0 (Windows NT 6.${t.datatype.number({min:1,max:3})}; Trident/7.0; ${t.datatype.boolean()?"Touch; ":""}rv:11.0) like Gecko`:`Mozilla/5.0 (compatible; MSIE ${l}.0; Windows NT ${o.nt()}; Trident/${o.trident()}${t.datatype.boolean()?`; .NET CLR ${o.net()}`:""})`},opera(l){let u=` Presto/${o.presto()} Version/${o.presto2()})`,d=l==="win"?`(Windows NT ${o.nt()}; U; ${a()}${u}`:l==="lin"?`(X11; Linux ${n(l)}; U; ${a()}${u}`:`(Macintosh; Intel Mac OS X ${o.osx()} U; ${a()} Presto/${o.presto()} Version/${o.presto2()})`;return`Opera/${t.datatype.number({min:9,max:14})}.${t.datatype.number({min:0,max:99})} ${d}`},safari(l){let u=o.safari(),d=`${t.datatype.number({min:4,max:7})}.${t.datatype.number({min:0,max:1})}.${t.datatype.number({min:0,max:10})}`;return`Mozilla/5.0 ${l==="mac"?`(Macintosh; ${n("mac")} Mac OS X ${o.osx("_")} rv:${t.datatype.number({min:2,max:6})}.0; ${a()}) `:`(Windows; U; Windows NT ${o.nt()})`}AppleWebKit/${u} (KHTML, like Gecko) Version/${d} Safari/${u}`},chrome(l){let u=o.safari();return`Mozilla/5.0 ${l==="mac"?`(Macintosh; ${n("mac")} Mac OS X ${o.osx("_")}) `:l==="win"?`(Windows; U; Windows NT ${o.nt()})`:`(X11; Linux ${n(l)}`} AppleWebKit/${u} (KHTML, like Gecko) Chrome/${o.chrome()} Safari/${u}`}},[p,c]=i();return s[p](c)}var N=class{constructor(e){this.faker=e;for(let a of Object.getOwnPropertyNames(N.prototype))a==="constructor"||typeof this[a]!="function"||(this[a]=this[a].bind(this))}avatar(){return`https://cloudflare-ipfs.com/ipfs/Qmd