UNPKG

gremlins-ts

Version:

A monkey testing library written in JavaScript, for Node.js and the browser. Use it to check the robustness of web applications by unleashing a horde of undisciplined gremlins.

1 lines 249 kB
!function(e,a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var n=a();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,function(){return function(e){var a={};function n(i){if(a[i])return a[i].exports;var r=a[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=a,n.d=function(e,a,i){n.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)n.d(i,r,function(a){return e[a]}.bind(null,r));return i},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="http://localhost:8080/",n(n.s=3)}([function(e,a,n){"use strict";function i(e){for(var n in e)a.hasOwnProperty(n)||(a[n]=e[n])}a.__esModule=!0,i(n(10)),i(n(11)),i(n(12))},function(e,a,n){"use strict";function i(e){for(var n in e)a.hasOwnProperty(n)||(a[n]=e[n])}a.__esModule=!0,i(n(15)),i(n(16))},function(e,a,n){(function(n){var i;!function(){var r=9007199254740992,t="abcdefghijklmnopqrstuvwxyz",o=t.toUpperCase(),s="0123456789abcdef";function l(e){this.name="UnsupportedError",this.message=e||"This feature is not supported on this platform"}l.prototype=new Error,l.prototype.constructor=l;var c=Array.prototype.slice;function u(e){if(!(this instanceof u))return e||(e=null),null===e?new u:new u(e);if("function"==typeof e)return this.random=e,this;arguments.length&&(this.seed=0);for(var a=0;a<arguments.length;a++){var n=0;if("[object String]"===Object.prototype.toString.call(arguments[a]))for(var i=0;i<arguments[a].length;i++){for(var r=0,t=0;t<arguments[a].length;t++)r=arguments[a].charCodeAt(t)+(r<<6)+(r<<16)-r;n+=r}else n=arguments[a];this.seed+=(arguments.length-a)*n}return this.mt=this.mersenne_twister(this.seed),this.bimd5=this.blueimp_md5(),this.random=function(){return this.mt.random(this.seed)},this}function m(e,a){if(e=e||{},a)for(var n in a)void 0===e[n]&&(e[n]=a[n]);return e}function d(e,a){if(e)throw new RangeError(a)}u.prototype.VERSION="1.0.18";var h=function(){throw new Error("No Base64 encoder available.")};function p(e){return function(){return this.natural(e)}}"function"==typeof btoa?h=btoa:"function"==typeof n&&(h=function(e){return new n(e).toString("base64")}),u.prototype.bool=function(e){return d((e=m(e,{likelihood:50})).likelihood<0||e.likelihood>100,"Chance: Likelihood accepts values from 0 to 100."),100*this.random()<e.likelihood},u.prototype.animal=function(e){return void 0!==(e=m(e)).type?(d(!this.get("animals")[e.type.toLowerCase()],"Please pick from desert, ocean, grassland, forest, zoo, pets, farm."),this.pick(this.get("animals")[e.type.toLowerCase()])):(animalTypeArray=["desert","forest","ocean","zoo","farm","pet","grassland"],this.pick(this.get("animals")[this.pick(animalTypeArray)]))},u.prototype.character=function(e){var a,n;return a="lower"===(e=m(e)).casing?t:"upper"===e.casing?o:t+o,e.pool?n=e.pool:(n="",e.alpha&&(n+=a),e.numeric&&(n+="0123456789"),e.symbols&&(n+="!@#$%^&*()[]"),n||(n=a+"0123456789!@#$%^&*()[]")),n.charAt(this.natural({max:n.length-1}))},u.prototype.floating=function(e){d((e=m(e,{fixed:4})).fixed&&e.precision,"Chance: Cannot specify both fixed and precision.");var a=Math.pow(10,e.fixed),n=r/a,i=-n;d(e.min&&e.fixed&&e.min<i,"Chance: Min specified is out of range with fixed. Min should be, at least, "+i),d(e.max&&e.fixed&&e.max>n,"Chance: Max specified is out of range with fixed. Max should be, at most, "+n),e=m(e,{min:i,max:n});var t=(this.integer({min:e.min*a,max:e.max*a})/a).toFixed(e.fixed);return parseFloat(t)},u.prototype.integer=function(e){return d((e=m(e,{min:-9007199254740992,max:r})).min>e.max,"Chance: Min cannot be greater than Max."),Math.floor(this.random()*(e.max-e.min+1)+e.min)},u.prototype.natural=function(e){return"number"==typeof(e=m(e,{min:0,max:r})).numerals&&(d(e.numerals<1,"Chance: Numerals cannot be less than one."),e.min=Math.pow(10,e.numerals-1),e.max=Math.pow(10,e.numerals)-1),d(e.min<0,"Chance: Min cannot be less than zero."),this.integer(e)},u.prototype.prime=function(e){d((e=m(e,{min:0,max:1e4})).min<0,"Chance: Min cannot be less than zero."),d(e.min>e.max,"Chance: Min cannot be greater than Max.");var a=b.primes[b.primes.length-1];if(e.max>a)for(var n=a+2;n<=e.max;++n)this.is_prime(n)&&b.primes.push(n);var i=b.primes.filter(function(a){return a>=e.min&&a<=e.max});return this.pick(i)},u.prototype.is_prime=function(e){if(e%1||e<2)return!1;if(e%2==0)return 2===e;if(e%3==0)return 3===e;for(var a=Math.sqrt(e),n=5;n<=a;n+=6)if(e%n==0||e%(n+2)==0)return!1;return!0},u.prototype.hex=function(e){d((e=m(e,{min:0,max:r,casing:"lower"})).min<0,"Chance: Min cannot be less than zero.");var a=this.natural({min:e.min,max:e.max});return"upper"===e.casing?a.toString(16).toUpperCase():a.toString(16)},u.prototype.letter=function(e){e=m(e,{casing:"lower"});var a=this.character({pool:"abcdefghijklmnopqrstuvwxyz"});return"upper"===e.casing&&(a=a.toUpperCase()),a},u.prototype.string=function(e){d((e=m(e,{length:this.natural({min:5,max:20})})).length<0,"Chance: Length cannot be less than zero.");var a=e.length;return this.n(this.character,a,e).join("")},u.prototype.buffer=function(e){if(void 0===n)throw new l("Sorry, the buffer() function is not supported on your platform");d((e=m(e,{length:this.natural({min:5,max:20})})).length<0,"Chance: Length cannot be less than zero.");var a=e.length,i=this.n(this.character,a,e);return n.from(i)},u.prototype.capitalize=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},u.prototype.mixin=function(e){for(var a in e)u.prototype[a]=e[a];return this},u.prototype.unique=function(e,a,n){d("function"!=typeof e,"Chance: The first argument must be a function.");var i=function(e,a){return-1!==e.indexOf(a)};n&&(i=n.comparator||i);for(var r,t=[],o=0,s=50*a,l=c.call(arguments,2);t.length<a;){var u=JSON.parse(JSON.stringify(l));if(i(t,r=e.apply(this,u))||(t.push(r),o=0),++o>s)throw new RangeError("Chance: num is likely too large for sample set")}return t},u.prototype.n=function(e,a){d("function"!=typeof e,"Chance: The first argument must be a function."),void 0===a&&(a=1);var n=a,i=[],r=c.call(arguments,2);for(n=Math.max(0,n);n--;null)i.push(e.apply(this,r));return i},u.prototype.pad=function(e,a,n){return n=n||"0",(e+="").length>=a?e:new Array(a-e.length+1).join(n)+e},u.prototype.pick=function(e,a){if(0===e.length)throw new RangeError("Chance: Cannot pick() from an empty array");return a&&1!==a?this.shuffle(e).slice(0,a):e[this.natural({max:e.length-1})]},u.prototype.pickone=function(e){if(0===e.length)throw new RangeError("Chance: Cannot pickone() from an empty array");return e[this.natural({max:e.length-1})]},u.prototype.pickset=function(e,a){if(0===a)return[];if(0===e.length)throw new RangeError("Chance: Cannot pickset() from an empty array");if(a<0)throw new RangeError("Chance: Count must be a positive number");if(a&&1!==a){var n=e.slice(0),i=n.length;return this.n(function(){var e=this.natural({max:--i}),a=n[e];return n[e]=n[i],a},Math.min(i,a))}return[this.pickone(e)]},u.prototype.shuffle=function(e){for(var a,n,i=[],r=0,t=Number(e.length),o=(n=t,Array.apply(null,Array(n)).map(function(e,a){return a})),s=t-1,l=0;l<t;l++)r=o[a=this.natural({max:s})],i[l]=e[r],o[a]=o[s],s-=1;return i},u.prototype.weighted=function(e,a,n){if(e.length!==a.length)throw new RangeError("Chance: Length of array and weights must match");for(var i,r=0,t=0;t<a.length;++t){if(i=a[t],isNaN(i))throw new RangeError("Chance: All weights must be numbers");i>0&&(r+=i)}if(0===r)throw new RangeError("Chance: No valid entries in array weights");var o,s=this.random()*r,l=0,c=-1;for(t=0;t<a.length;++t){if(l+=i=a[t],i>0){if(s<=l){o=t;break}c=t}t===a.length-1&&(o=c)}var u=e[o];return(n=void 0!==n&&n)&&(e.splice(o,1),a.splice(o,1)),u},u.prototype.paragraph=function(e){var a=(e=m(e)).sentences||this.natural({min:3,max:7});return this.n(this.sentence,a).join(" ")},u.prototype.sentence=function(e){var a,n=(e=m(e)).words||this.natural({min:12,max:18}),i=e.punctuation;return a=this.n(this.word,n).join(" "),a=this.capitalize(a),!1===i||/^[\.\?;!:]$/.test(i)||(i="."),i&&(a+=i),a},u.prototype.syllable=function(e){for(var a,n=(e=m(e)).length||this.natural({min:2,max:3}),i="",r=0;r<n;r++)i+=a=0===r?this.character({pool:"bcdfghjklmnprstvwzaeiou"}):-1==="bcdfghjklmnprstvwz".indexOf(a)?this.character({pool:"bcdfghjklmnprstvwz"}):this.character({pool:"aeiou"});return e.capitalize&&(i=this.capitalize(i)),i},u.prototype.word=function(e){d((e=m(e)).syllables&&e.length,"Chance: Cannot specify both syllables AND length.");var a=e.syllables||this.natural({min:1,max:3}),n="";if(e.length){do{n+=this.syllable()}while(n.length<e.length);n=n.substring(0,e.length)}else for(var i=0;i<a;i++)n+=this.syllable();return e.capitalize&&(n=this.capitalize(n)),n},u.prototype.age=function(e){var a;switch((e=m(e)).type){case"child":a={min:0,max:12};break;case"teen":a={min:13,max:19};break;case"adult":a={min:18,max:65};break;case"senior":a={min:65,max:100};break;case"all":a={min:0,max:100};break;default:a={min:18,max:65}}return this.natural(a)},u.prototype.birthday=function(e){var a=this.age(e),n=(new Date).getFullYear();if(e&&e.type){var i=new Date,r=new Date;i.setFullYear(n-a-1),r.setFullYear(n-a),e=m(e,{min:i,max:r})}else e=m(e,{year:n-a});return this.date(e)},u.prototype.cpf=function(e){e=m(e,{formatted:!0});var a=this.n(this.natural,9,{max:9}),n=2*a[8]+3*a[7]+4*a[6]+5*a[5]+6*a[4]+7*a[3]+8*a[2]+9*a[1]+10*a[0];(n=11-n%11)>=10&&(n=0);var i=2*n+3*a[8]+4*a[7]+5*a[6]+6*a[5]+7*a[4]+8*a[3]+9*a[2]+10*a[1]+11*a[0];(i=11-i%11)>=10&&(i=0);var r=""+a[0]+a[1]+a[2]+"."+a[3]+a[4]+a[5]+"."+a[6]+a[7]+a[8]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},u.prototype.cnpj=function(e){e=m(e,{formatted:!0});var a=this.n(this.natural,12,{max:12}),n=2*a[11]+3*a[10]+4*a[9]+5*a[8]+6*a[7]+7*a[6]+8*a[5]+9*a[4]+2*a[3]+3*a[2]+4*a[1]+5*a[0];(n=11-n%11)<2&&(n=0);var i=2*n+3*a[11]+4*a[10]+5*a[9]+6*a[8]+7*a[7]+8*a[6]+9*a[5]+2*a[4]+3*a[3]+4*a[2]+5*a[1]+6*a[0];(i=11-i%11)<2&&(i=0);var r=""+a[0]+a[1]+"."+a[2]+a[3]+a[4]+"."+a[5]+a[6]+a[7]+"/"+a[8]+a[9]+a[10]+a[11]+"-"+n+i;return e.formatted?r:r.replace(/\D/g,"")},u.prototype.first=function(e){return e=m(e,{gender:this.gender(),nationality:"en"}),this.pick(this.get("firstNames")[e.gender.toLowerCase()][e.nationality.toLowerCase()])},u.prototype.profession=function(e){return(e=m(e)).rank?this.pick(["Apprentice ","Junior ","Senior ","Lead "])+this.pick(this.get("profession")):this.pick(this.get("profession"))},u.prototype.company=function(){return this.pick(this.get("company"))},u.prototype.gender=function(e){return e=m(e,{extraGenders:[]}),this.pick(["Male","Female"].concat(e.extraGenders))},u.prototype.last=function(e){if("*"===(e=m(e,{nationality:"*"})).nationality){var a=[],n=this.get("lastNames");return Object.keys(n).forEach(function(e,i){a=a.concat(n[e])}),this.pick(a)}return this.pick(this.get("lastNames")[e.nationality.toLowerCase()])},u.prototype.israelId=function(){for(var e=this.string({pool:"0123456789",length:8}),a=0,n=0;n<e.length;n++){var i=e[n]*(n/2===parseInt(n/2)?1:2);i=this.pad(i,2).toString(),a+=i=parseInt(i[0])+parseInt(i[1])}return e+=(10-parseInt(a.toString().slice(-1))).toString().slice(-1)},u.prototype.mrz=function(e){var a,n,i,r,t=function(e){var a="<ABCDEFGHIJKLMNOPQRSTUVWXYXZ".split(""),n=[7,3,1],i=0;return"string"!=typeof e&&(e=e.toString()),e.split("").forEach(function(e,r){var t=a.indexOf(e);e=-1!==t?0===t?0:t+9:parseInt(e,10),i+=e*=n[r%n.length]}),i%10},o=this;return e=m(e,{first:this.first(),last:this.last(),passportNumber:this.integer({min:1e8,max:999999999}),dob:(a=o.birthday({type:"adult"}),[a.getFullYear().toString().substr(2),o.pad(a.getMonth()+1,2),o.pad(a.getDate(),2)].join("")),expiry:function(){var e=new Date;return[(e.getFullYear()+5).toString().substr(2),o.pad(e.getMonth()+1,2),o.pad(e.getDate(),2)].join("")}(),gender:"Female"===this.gender()?"F":"M",issuer:"GBR",nationality:"GBR"}),i=function(e){return new Array(e+1).join("<")},(r=["P<",(n=e).issuer,n.last.toUpperCase(),"<<",n.first.toUpperCase(),i(39-(n.last.length+n.first.length+2)),n.passportNumber,t(n.passportNumber),n.nationality,n.dob,t(n.dob),n.gender,n.expiry,t(n.expiry),i(14),t(i(14))].join(""))+t(r.substr(44,10)+r.substr(57,7)+r.substr(65,7))},u.prototype.name=function(e){e=m(e);var a,n=this.first(e),i=this.last(e);return a=e.middle?n+" "+this.first(e)+" "+i:e.middle_initial?n+" "+this.character({alpha:!0,casing:"upper"})+". "+i:n+" "+i,e.prefix&&(a=this.prefix(e)+" "+a),e.suffix&&(a=a+" "+this.suffix(e)),a},u.prototype.name_prefixes=function(e){var a=[{name:"Doctor",abbreviation:"Dr."}];return"male"!==(e=(e=e||"all").toLowerCase())&&"all"!==e||a.push({name:"Mister",abbreviation:"Mr."}),"female"!==e&&"all"!==e||(a.push({name:"Miss",abbreviation:"Miss"}),a.push({name:"Misses",abbreviation:"Mrs."})),a},u.prototype.prefix=function(e){return this.name_prefix(e)},u.prototype.name_prefix=function(e){return(e=m(e,{gender:"all"})).full?this.pick(this.name_prefixes(e.gender)).name:this.pick(this.name_prefixes(e.gender)).abbreviation},u.prototype.HIDN=function(){var e="";return e+=this.string({pool:"0123456789",length:6}),e+=this.string({pool:"ABCDEFGHIJKLMNOPQRSTUVWXYXZ",length:2})},u.prototype.ssn=function(e){var a=(e=m(e,{ssnFour:!1,dashes:!0})).dashes?"-":"";return e.ssnFour?this.string({pool:"1234567890",length:4}):this.string({pool:"1234567890",length:3})+a+this.string({pool:"1234567890",length:2})+a+this.string({pool:"1234567890",length:4})},u.prototype.aadhar=function(e){var a=(e=m(e,{onlyLastFour:!1,separatedByWhiteSpace:!0})).separatedByWhiteSpace?" ":"";return e.onlyLastFour?this.string({pool:"1234567890",length:4}):this.string({pool:"1234567890",length:4})+a+this.string({pool:"1234567890",length:4})+a+this.string({pool:"1234567890",length:4})},u.prototype.name_suffixes=function(){return[{name:"Doctor of Osteopathic Medicine",abbreviation:"D.O."},{name:"Doctor of Philosophy",abbreviation:"Ph.D."},{name:"Esquire",abbreviation:"Esq."},{name:"Junior",abbreviation:"Jr."},{name:"Juris Doctor",abbreviation:"J.D."},{name:"Master of Arts",abbreviation:"M.A."},{name:"Master of Business Administration",abbreviation:"M.B.A."},{name:"Master of Science",abbreviation:"M.S."},{name:"Medical Doctor",abbreviation:"M.D."},{name:"Senior",abbreviation:"Sr."},{name:"The Third",abbreviation:"III"},{name:"The Fourth",abbreviation:"IV"},{name:"Bachelor of Engineering",abbreviation:"B.E"},{name:"Bachelor of Technology",abbreviation:"B.TECH"}]},u.prototype.suffix=function(e){return this.name_suffix(e)},u.prototype.name_suffix=function(e){return(e=m(e)).full?this.pick(this.name_suffixes()).name:this.pick(this.name_suffixes()).abbreviation},u.prototype.nationalities=function(){return this.get("nationalities")},u.prototype.nationality=function(){return this.pick(this.nationalities()).name},u.prototype.android_id=function(){return"APA91"+this.string({pool:"0123456789abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",length:178})},u.prototype.apple_token=function(){return this.string({pool:"abcdef1234567890",length:64})},u.prototype.wp8_anid2=function(){return h(this.hash({length:32}))},u.prototype.wp7_anid=function(){return"A="+this.guid().replace(/-/g,"").toUpperCase()+"&E="+this.hash({length:3})+"&W="+this.integer({min:0,max:9})},u.prototype.bb_pin=function(){return this.hash({length:8})},u.prototype.avatar=function(e){var a={protocol:null,email:null,fileExtension:null,size:null,fallback:null,rating:null};if(e)if("string"==typeof e)a.email=e,e={};else{if("object"!=typeof e)return null;if("Array"===e.constructor)return null}else a.email=this.email(),e={};return(a=m(e,a)).email||(a.email=this.email()),a.protocol={http:"http",https:"https"}[a.protocol]?a.protocol+":":"",a.size=parseInt(a.size,0)?a.size:"",a.rating={g:"g",pg:"pg",r:"r",x:"x"}[a.rating]?a.rating:"",a.fallback={404:"404",mm:"mm",identicon:"identicon",monsterid:"monsterid",wavatar:"wavatar",retro:"retro",blank:"blank"}[a.fallback]?a.fallback:"",a.fileExtension={bmp:"bmp",gif:"gif",jpg:"jpg",png:"png"}[a.fileExtension]?a.fileExtension:"",a.protocol+"//www.gravatar.com/avatar/"+this.bimd5.md5(a.email)+(a.fileExtension?"."+a.fileExtension:"")+(a.size||a.rating||a.fallback?"?":"")+(a.size?"&s="+a.size.toString():"")+(a.rating?"&r="+a.rating:"")+(a.fallback?"&d="+a.fallback:"")},u.prototype.color=function(e){function a(e,a){return[e,e,e].join(a||"")}function n(e){var n=e?"rgba":"rgb",i=e?","+this.floating({min:b,max:f}):"";return n+"("+(t?a(this.natural({min:o,max:s}),","):this.natural({min:u,max:d})+","+this.natural({min:h,max:p})+","+this.natural({max:255}))+i+")"}function i(n,i,r){var m=r?"#":"",b="";return t?(b=a(this.pad(this.hex({min:o,max:s}),2)),"shorthex"===e.format&&(b=a(this.hex({min:0,max:15})))):b="shorthex"===e.format?this.pad(this.hex({min:Math.floor(l/16),max:Math.floor(c/16)}),1)+this.pad(this.hex({min:Math.floor(u/16),max:Math.floor(d/16)}),1)+this.pad(this.hex({min:Math.floor(h/16),max:Math.floor(p/16)}),1):void 0!==l||void 0!==c||void 0!==u||void 0!==d||void 0!==h||void 0!==p?this.pad(this.hex({min:l,max:c}),2)+this.pad(this.hex({min:u,max:d}),2)+this.pad(this.hex({min:h,max:p}),2):this.pad(this.hex({min:o,max:s}),2)+this.pad(this.hex({min:o,max:s}),2)+this.pad(this.hex({min:o,max:s}),2),m+b}var r,t=(e=m(e,{format:this.pick(["hex","shorthex","rgb","rgba","0x","name"]),grayscale:!1,casing:"lower",min:0,max:255,min_red:void 0,max_red:void 0,min_green:void 0,max_green:void 0,min_blue:void 0,max_blue:void 0,min_alpha:0,max_alpha:1})).grayscale,o=e.min,s=e.max,l=e.min_red,c=e.max_red,u=e.min_green,d=e.max_green,h=e.min_blue,p=e.max_blue,b=e.min_alpha,f=e.max_alpha;if(void 0===e.min_red&&(l=o),void 0===e.max_red&&(c=s),void 0===e.min_green&&(u=o),void 0===e.max_green&&(d=s),void 0===e.min_blue&&(h=o),void 0===e.max_blue&&(p=s),void 0===e.min_alpha&&(b=0),void 0===e.max_alpha&&(f=1),t&&0===o&&255===s&&void 0!==l&&void 0!==c&&(o=(l+u+h)/3,s=(c+d+p)/3),"hex"===e.format)r=i.call(this,2,6,!0);else if("shorthex"===e.format)r=i.call(this,1,3,!0);else if("rgb"===e.format)r=n.call(this,!1);else if("rgba"===e.format)r=n.call(this,!0);else{if("0x"!==e.format){if("name"===e.format)return this.pick(this.get("colorNames"));throw new RangeError('Invalid format provided. Please provide one of "hex", "shorthex", "rgb", "rgba", "0x" or "name".')}r="0x"+i.call(this,2,6)}return"upper"===e.casing&&(r=r.toUpperCase()),r},u.prototype.domain=function(e){return e=m(e),this.word()+"."+(e.tld||this.tld())},u.prototype.email=function(e){return e=m(e),this.word({length:e.length})+"@"+(e.domain||this.domain())},u.prototype.fbid=function(){return"10000"+this.string({pool:"1234567890",length:11})},u.prototype.google_analytics=function(){return"UA-"+this.pad(this.natural({max:999999}),6)+"-"+this.pad(this.natural({max:99}),2)},u.prototype.hashtag=function(){return"#"+this.word()},u.prototype.ip=function(){return this.natural({min:1,max:254})+"."+this.natural({max:255})+"."+this.natural({max:255})+"."+this.natural({min:1,max:254})},u.prototype.ipv6=function(){return this.n(this.hash,8,{length:4}).join(":")},u.prototype.klout=function(){return this.natural({min:1,max:99})},u.prototype.semver=function(e){e=m(e,{include_prerelease:!0});var a=this.pickone(["^","~","<",">","<=",">=","="]);e.range&&(a=e.range);var n="";return e.include_prerelease&&(n=this.weighted(["","-dev","-beta","-alpha"],[50,10,5,1])),a+this.rpg("3d10").join(".")+n},u.prototype.tlds=function(){return["com","org","edu","gov","co.uk","net","io","ac","ad","ae","af","ag","ai","al","am","an","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","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","eu","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","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","su","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tp","tr","tt","tv","tw","tz","ua","ug","uk","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","za","zm","zw"]},u.prototype.tld=function(){return this.pick(this.tlds())},u.prototype.twitter=function(){return"@"+this.word()},u.prototype.url=function(e){var a=(e=m(e,{protocol:"http",domain:this.domain(e),domain_prefix:"",path:this.word(),extensions:[]})).extensions.length>0?"."+this.pick(e.extensions):"",n=e.domain_prefix?e.domain_prefix+"."+e.domain:e.domain;return e.protocol+"://"+n+"/"+e.path+a},u.prototype.port=function(){return this.integer({min:0,max:65535})},u.prototype.locale=function(e){return(e=m(e)).region?this.pick(this.get("locale_regions")):this.pick(this.get("locale_languages"))},u.prototype.locales=function(e){return(e=m(e)).region?this.get("locale_regions"):this.get("locale_languages")},u.prototype.loremPicsum=function(e){var a=(e=m(e,{width:500,height:500,greyscale:!1,blurred:!1})).greyscale?"g/":"",n=e.blurred?"/?blur":"/?random";return"https://picsum.photos/"+a+e.width+"/"+e.height+n},u.prototype.address=function(e){return e=m(e),this.natural({min:5,max:2e3})+" "+this.street(e)},u.prototype.altitude=function(e){return e=m(e,{fixed:5,min:0,max:8848}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},u.prototype.areacode=function(e){e=m(e,{parens:!0});var a=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:8}).toString()+this.natural({min:0,max:9}).toString();return e.parens?"("+a+")":a},u.prototype.city=function(){return this.capitalize(this.word({syllables:3}))},u.prototype.coordinates=function(e){return this.latitude(e)+", "+this.longitude(e)},u.prototype.countries=function(){return this.get("countries")},u.prototype.country=function(e){e=m(e);var a=this.pick(this.countries());return e.raw?a:e.full?a.name:a.abbreviation},u.prototype.depth=function(e){return e=m(e,{fixed:5,min:-10994,max:0}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},u.prototype.geohash=function(e){return e=m(e,{length:7}),this.string({length:e.length,pool:"0123456789bcdefghjkmnpqrstuvwxyz"})},u.prototype.geojson=function(e){return this.latitude(e)+", "+this.longitude(e)+", "+this.altitude(e)},u.prototype.latitude=function(e){return e=m(e,{fixed:5,min:-90,max:90}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},u.prototype.longitude=function(e){return e=m(e,{fixed:5,min:-180,max:180}),this.floating({min:e.min,max:e.max,fixed:e.fixed})},u.prototype.phone=function(e){var a,n,i=this,r=function(e){var a=[];return e.sections.forEach(function(e){a.push(i.string({pool:"0123456789",length:e}))}),e.area+a.join(" ")};switch((e=m(e,{formatted:!0,country:"us",mobile:!1})).formatted||(e.parens=!1),e.country){case"fr":e.mobile?(a=this.pick(["06","07"])+i.string({pool:"0123456789",length:8}),n=e.formatted?a.match(/../g).join(" "):a):(a=this.pick(["01"+this.pick(["30","34","39","40","41","42","43","44","45","46","47","48","49","53","55","56","58","60","64","69","70","72","73","74","75","76","77","78","79","80","81","82","83"])+i.string({pool:"0123456789",length:6}),"02"+this.pick(["14","18","22","23","28","29","30","31","32","33","34","35","36","37","38","40","41","43","44","45","46","47","48","49","50","51","52","53","54","56","57","61","62","69","72","76","77","78","85","90","96","97","98","99"])+i.string({pool:"0123456789",length:6}),"03"+this.pick(["10","20","21","22","23","24","25","26","27","28","29","39","44","45","51","52","54","55","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","80","81","82","83","84","85","86","87","88","89","90"])+i.string({pool:"0123456789",length:6}),"04"+this.pick(["11","13","15","20","22","26","27","30","32","34","37","42","43","44","50","56","57","63","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","88","89","90","91","92","93","94","95","97","98"])+i.string({pool:"0123456789",length:6}),"05"+this.pick(["08","16","17","19","24","31","32","33","34","35","40","45","46","47","49","53","55","56","57","58","59","61","62","63","64","65","67","79","81","82","86","87","90","94"])+i.string({pool:"0123456789",length:6}),"09"+i.string({pool:"0123456789",length:8})]),n=e.formatted?a.match(/../g).join(" "):a);break;case"uk":e.mobile?(a=this.pick([{area:"07"+this.pick(["4","5","7","8","9"]),sections:[2,6]},{area:"07624 ",sections:[6]}]),n=e.formatted?r(a):r(a).replace(" ","")):(a=this.pick([{area:"01"+this.character({pool:"234569"})+"1 ",sections:[3,4]},{area:"020 "+this.character({pool:"378"}),sections:[3,4]},{area:"023 "+this.character({pool:"89"}),sections:[3,4]},{area:"024 7",sections:[3,4]},{area:"028 "+this.pick(["25","28","37","71","82","90","92","95"]),sections:[2,4]},{area:"012"+this.pick(["04","08","54","76","97","98"])+" ",sections:[6]},{area:"013"+this.pick(["63","64","84","86"])+" ",sections:[6]},{area:"014"+this.pick(["04","20","60","61","80","88"])+" ",sections:[6]},{area:"015"+this.pick(["24","27","62","66"])+" ",sections:[6]},{area:"016"+this.pick(["06","29","35","47","59","95"])+" ",sections:[6]},{area:"017"+this.pick(["26","44","50","68"])+" ",sections:[6]},{area:"018"+this.pick(["27","37","84","97"])+" ",sections:[6]},{area:"019"+this.pick(["00","05","35","46","49","63","95"])+" ",sections:[6]}]),n=e.formatted?r(a):r(a).replace(" ","","g"));break;case"za":e.mobile?(a=this.pick(["060"+this.pick(["3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"061"+this.pick(["0","1","2","3","4","5","8"])+i.string({pool:"0123456789",length:6}),"06"+i.string({pool:"0123456789",length:7}),"071"+this.pick(["0","1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:6}),"07"+this.pick(["2","3","4","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"08"+this.pick(["0","1","2","3","4","5"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||a):(a=this.pick(["01"+this.pick(["0","1","2","3","4","5","6","7","8"])+i.string({pool:"0123456789",length:7}),"02"+this.pick(["1","2","3","4","7","8"])+i.string({pool:"0123456789",length:7}),"03"+this.pick(["1","2","3","5","6","9"])+i.string({pool:"0123456789",length:7}),"04"+this.pick(["1","2","3","4","5","6","7","8","9"])+i.string({pool:"0123456789",length:7}),"05"+this.pick(["1","3","4","6","7","8"])+i.string({pool:"0123456789",length:7})]),n=e.formatted||a);break;case"us":var t=this.areacode(e).toString(),o=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:9}).toString()+this.natural({min:0,max:9}).toString(),s=this.natural({min:1e3,max:9999}).toString();n=e.formatted?t+" "+o+"-"+s:t+o+s;break;case"br":var l,c=this.pick(["11","12","13","14","15","16","17","18","19","21","22","24","27","28","31","32","33","34","35","37","38","41","42","43","44","45","46","47","48","49","51","53","54","55","61","62","63","64","65","66","67","68","69","71","73","74","75","77","79","81","82","83","84","85","86","87","88","89","91","92","93","94","95","96","97","98","99"]);l=e.mobile?"9"+i.string({pool:"0123456789",length:4}):this.natural({min:2e3,max:5999}).toString();var u=i.string({pool:"0123456789",length:4});n=e.formatted?"("+c+") "+l+"-"+u:c+l+u}return n},u.prototype.postal=function(){return this.character({pool:"XVTSRPNKLMHJGECBA"})+this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+" "+(this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+this.natural({max:9}))},u.prototype.postcode=function(){return this.pick(this.get("postcodeAreas")).code+this.natural({max:9})+(this.bool()?this.character({alpha:!0,casing:"upper"}):"")+" "+(this.natural({max:9})+(this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})))},u.prototype.counties=function(e){return e=m(e,{country:"uk"}),this.get("counties")[e.country.toLowerCase()]},u.prototype.county=function(e){return this.pick(this.counties(e)).name},u.prototype.provinces=function(e){return e=m(e,{country:"ca"}),this.get("provinces")[e.country.toLowerCase()]},u.prototype.province=function(e){return e&&e.full?this.pick(this.provinces(e)).name:this.pick(this.provinces(e)).abbreviation},u.prototype.state=function(e){return e&&e.full?this.pick(this.states(e)).name:this.pick(this.states(e)).abbreviation},u.prototype.states=function(e){var a;switch((e=m(e,{country:"us",us_states_and_dc:!0})).country.toLowerCase()){case"us":var n=this.get("us_states_and_dc"),i=this.get("territories"),r=this.get("armed_forces");a=[],e.us_states_and_dc&&(a=a.concat(n)),e.territories&&(a=a.concat(i)),e.armed_forces&&(a=a.concat(r));break;case"it":a=this.get("country_regions")[e.country.toLowerCase()];break;case"uk":a=this.get("counties")[e.country.toLowerCase()]}return a},u.prototype.street=function(e){var a;switch((e=m(e,{country:"us",syllables:2})).country.toLowerCase()){case"us":a=this.word({syllables:e.syllables}),a=this.capitalize(a),a+=" ",a+=e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name;break;case"it":a=this.word({syllables:e.syllables}),a=this.capitalize(a),a=(e.short_suffix?this.street_suffix(e).abbreviation:this.street_suffix(e).name)+" "+a}return a},u.prototype.street_suffix=function(e){return e=m(e,{country:"us"}),this.pick(this.street_suffixes(e))},u.prototype.street_suffixes=function(e){return e=m(e,{country:"us"}),this.get("street_suffixes")[e.country.toLowerCase()]},u.prototype.zip=function(e){var a=this.n(this.natural,5,{max:9});return e&&!0===e.plusfour&&(a.push("-"),a=a.concat(this.n(this.natural,4,{max:9}))),a.join("")},u.prototype.ampm=function(){return this.bool()?"am":"pm"},u.prototype.date=function(e){var a,n;if(e&&(e.min||e.max)){var i=void 0!==(e=m(e,{american:!0,string:!1})).min?e.min.getTime():1,r=void 0!==e.max?e.max.getTime():864e13;n=new Date(this.integer({min:i,max:r}))}else{var t=this.month({raw:!0}),o=t.days;e&&e.month&&(o=this.get("months")[(e.month%12+12)%12].days),e=m(e,{year:parseInt(this.year(),10),month:t.numeric-1,day:this.natural({min:1,max:o}),hour:this.hour({twentyfour:!0}),minute:this.minute(),second:this.second(),millisecond:this.millisecond(),american:!0,string:!1}),n=new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}return a=e.american?n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear():n.getDate()+"/"+(n.getMonth()+1)+"/"+n.getFullYear(),e.string?a:n},u.prototype.hammertime=function(e){return this.date(e).getTime()},u.prototype.hour=function(e){return d((e=m(e,{min:e&&e.twentyfour?0:1,max:e&&e.twentyfour?23:12})).min<0,"Chance: Min cannot be less than 0."),d(e.twentyfour&&e.max>23,"Chance: Max cannot be greater than 23 for twentyfour option."),d(!e.twentyfour&&e.max>12,"Chance: Max cannot be greater than 12."),d(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},u.prototype.millisecond=function(){return this.natural({max:999})},u.prototype.minute=u.prototype.second=function(e){return d((e=m(e,{min:0,max:59})).min<0,"Chance: Min cannot be less than 0."),d(e.max>59,"Chance: Max cannot be greater than 59."),d(e.min>e.max,"Chance: Min cannot be greater than Max."),this.natural({min:e.min,max:e.max})},u.prototype.month=function(e){d((e=m(e,{min:1,max:12})).min<1,"Chance: Min cannot be less than 1."),d(e.max>12,"Chance: Max cannot be greater than 12."),d(e.min>e.max,"Chance: Min cannot be greater than Max.");var a=this.pick(this.months().slice(e.min-1,e.max));return e.raw?a:a.name},u.prototype.months=function(){return this.get("months")},u.prototype.second=function(){return this.natural({max:59})},u.prototype.timestamp=function(){return this.natural({min:1,max:parseInt((new Date).getTime()/1e3,10)})},u.prototype.weekday=function(e){var a=["Monday","Tuesday","Wednesday","Thursday","Friday"];return(e=m(e,{weekday_only:!1})).weekday_only||(a.push("Saturday"),a.push("Sunday")),this.pickone(a)},u.prototype.year=function(e){return(e=m(e,{min:(new Date).getFullYear()})).max=void 0!==e.max?e.max:e.min+100,this.natural(e).toString()},u.prototype.cc=function(e){var a,n,i;return n=(a=(e=m(e)).type?this.cc_type({name:e.type,raw:!0}):this.cc_type({raw:!0})).prefix.split(""),i=a.length-a.prefix.length-1,(n=n.concat(this.n(this.integer,i,{min:0,max:9}))).push(this.luhn_calculate(n.join(""))),n.join("")},u.prototype.cc_types=function(){return this.get("cc_types")},u.prototype.cc_type=function(e){e=m(e);var a=this.cc_types(),n=null;if(e.name){for(var i=0;i<a.length;i++)if(a[i].name===e.name||a[i].short_name===e.name){n=a[i];break}if(null===n)throw new RangeError("Chance: Credit card type '"+e.name+"' is not supported")}else n=this.pick(a);return e.raw?n:n.name},u.prototype.currency_types=function(){return this.get("currency_types")},u.prototype.currency=function(){return this.pick(this.currency_types())},u.prototype.timezones=function(){return this.get("timezones")},u.prototype.timezone=function(){return this.pick(this.timezones())},u.prototype.currency_pair=function(e){var a=this.unique(this.currency,2,{comparator:function(e,a){return e.reduce(function(e,n){return e||n.code===a.code},!1)}});return e?a[0].code+"/"+a[1].code:a},u.prototype.dollar=function(e){e=m(e,{max:1e4,min:0});var a=this.floating({min:e.min,max:e.max,fixed:2}).toString(),n=a.split(".")[1];return void 0===n?a+=".00":n.length<2&&(a+="0"),a<0?"-$"+a.replace("-",""):"$"+a},u.prototype.euro=function(e){return Number(this.dollar(e).replace("$","")).toLocaleString()+"€"},u.prototype.exp=function(e){e=m(e);var a={};return a.year=this.exp_year(),a.year===(new Date).getFullYear().toString()?a.month=this.exp_month({future:!0}):a.month=this.exp_month(),e.raw?a:a.month+"/"+a.year},u.prototype.exp_month=function(e){e=m(e);var a,n,i=(new Date).getMonth()+1;if(e.future&&12!==i)do{a=this.month({raw:!0}).numeric,n=parseInt(a,10)}while(n<=i);else a=this.month({raw:!0}).numeric;return a},u.prototype.exp_year=function(){var e=(new Date).getMonth()+1,a=(new Date).getFullYear();return this.year({min:12===e?a+1:a,max:a+10})},u.prototype.vat=function(e){switch((e=m(e,{country:"it"})).country.toLowerCase()){case"it":return this.it_vat()}},u.prototype.iban=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return this.string({length:2,pool:e})+this.pad(this.integer({min:0,max:99}),2)+this.string({length:4,pool:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"})+this.pad(this.natural(),this.natural({min:6,max:26}))},u.prototype.it_vat=function(){var e=this.natural({min:1,max:18e5});return(e=this.pad(e,7)+this.pad(this.pick(this.provinces({country:"it"})).code,3))+this.luhn_calculate(e)},u.prototype.cf=function(e){var a=(e=e||{}).gender?e.gender:this.gender(),n=e.first?e.first:this.first({gender:a,nationality:"it"}),i=e.last?e.last:this.last({nationality:"it"}),r=e.birthday?e.birthday:this.birthday(),t=e.city?e.city:this.pickone(["A","B","C","D","E","F","G","H","I","L","M","Z"])+this.pad(this.natural({max:999}),3),o=[],s=function(e,a){var n,i=[];return e.length<3?i=e.split("").concat("XXX".split("")).splice(0,3):((n=e.toUpperCase().split("").map(function(e){return-1!=="BCDFGHJKLMNPRSTVWZ".indexOf(e)?e:void 0}).join("")).length>3&&(n=a?n.substr(0,3):n[0]+n.substr(2,2)),n.length<3&&(i=n,n=e.toUpperCase().split("").map(function(e){return-1!=="AEIOU".indexOf(e)?e:void 0}).join("").substr(0,3-i.length)),i+=n),i};return o=o.concat(s(i,!0),s(n),function(e,a,n){return e.getFullYear().toString().substr(2)+["A","B","C","D","E","H","L","M","P","R","S","T"][e.getMonth()]+n.pad(e.getDate()+("female"===a.toLowerCase()?40:0),2)}(r,a,this),t.toUpperCase().split("")).join(""),(o+=function(e){for(var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n="ABCDEFGHIJABCDEFGHIJKLMNOPQRSTUVWXYZ",i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0,t=0;t<15;t++)r+=t%2!=0?i.indexOf(n[a.indexOf(e[t])]):"BAKPLCQDREVOSFTGUHMINJWZYX".indexOf(n[a.indexOf(e[t])]);return i[r%26]}(o.toUpperCase())).toUpperCase()},u.prototype.pl_pesel=function(){for(var e=this.natural({min:1,max:9999999999}),a=this.pad(e,10).split(""),n=0;n<a.length;n++)a[n]=parseInt(a[n]);var i=(1*a[0]+3*a[1]+7*a[2]+9*a[3]+1*a[4]+3*a[5]+7*a[6]+9*a[7]+1*a[8]+3*a[9])%10;return 0!==i&&(i=10-i),a.join("")+i},u.prototype.pl_nip=function(){for(var e=this.natural({min:1,max:999999999}),a=this.pad(e,9).split(""),n=0;n<a.length;n++)a[n]=parseInt(a[n]);var i=(6*a[0]+5*a[1]+7*a[2]+2*a[3]+3*a[4]+4*a[5]+5*a[6]+6*a[7]+7*a[8])%11;return 10===i?this.pl_nip():a.join("")+i},u.prototype.pl_regon=function(){for(var e=this.natural({min:1,max:99999999}),a=this.pad(e,8).split(""),n=0;n<a.length;n++)a[n]=parseInt(a[n]);var i=(8*a[0]+9*a[1]+2*a[2]+3*a[3]+4*a[4]+5*a[5]+6*a[6]+7*a[7])%11;return 10===i&&(i=0),a.join("")+i},u.prototype.note=function(e){e=m(e,{notes:"flatKey"});var a={naturals:["C","D","E","F","G","A","B"],flats:["D♭","E♭","G♭","A♭","B♭"],sharps:["C♯","D♯","F♯","G♯","A♯"]};return a.all=a.naturals.concat(a.flats.concat(a.sharps)),a.flatKey=a.naturals.concat(a.flats),a.sharpKey=a.naturals.concat(a.sharps),this.pickone(a[e.notes])},u.prototype.midi_note=function(e){return e=m(e,{min:0,max:127}),this.integer({min:e.min,max:e.max})},u.prototype.chord_quality=function(e){var a=["maj","min","aug","dim"];return(e=m(e,{jazz:!0})).jazz&&(a=["maj7","min7","7","sus","dim","ø"]),this.pickone(a)},u.prototype.chord=function(e){return e=m(e),this.note(e)+this.chord_quality(e)},u.prototype.tempo=function(e){return e=m(e,{min:40,max:320}),this.integer({min:e.min,max:e.max})},u.prototype.coin=function(e){return this.bool()?"heads":"tails"},u.prototype.d4=p({min:1,max:4}),u.prototype.d6=p({min:1,max:6}),u.prototype.d8=p({min:1,max:8}),u.prototype.d10=p({min:1,max:10}),u.prototype.d12=p({min:1,max:12}),u.prototype.d20=p({min:1,max:20}),u.prototype.d30=p({min:1,max:30}),u.prototype.d100=p({min:1,max:100}),u.prototype.rpg=function(e,a){if(a=m(a),e){var n=e.toLowerCase().split("d"),i=[];if(2!==n.length||!parseInt(n[0],10)||!parseInt(n[1],10))throw new Error("Chance: Invalid format provided. Please provide #d# where the first # is the number of dice to roll, the second # is the max of each die");for(var r=n[0];r>0;r--)i[r-1]=this.natural({min:1,max:n[1]});return void 0!==a.sum&&a.sum?i.reduce(function(e,a){return e+a}):i}throw new RangeError("Chance: A type of die roll must be included")},u.prototype.guid=function(e){e=m(e,{version:5});var a="abcdef1234567890";return this.string({pool:a,length:8})+"-"+this.string({pool:a,length:4})+"-"+e.version+this.string({pool:a,length:3})+"-"+this.string({pool:"ab89",length:1})+this.string({pool:a,length:3})+"-"+this.string({pool:a,length:12})},u.prototype.hash=function(e){var a="upper"===(e=m(e,{length:40,casing:"lower"})).casing?s.toUpperCase():s;return this.string({pool:a,length:e.length})},u.prototype.luhn_check=function(e){var a=e.toString();return+a.substring(a.length-1)===this.luhn_calculate(+a.substring(0,a.length-1))},u.prototype.luhn_calculate=function(e){for(var a,n=e.toString().split("").reverse(),i=0,r=0,t=n.length;t>r;++r)a=+n[r],r%2==0&&(a*=2)>9&&(a-=9),i+=a;return 9*i%10},u.prototype.md5=function(e){var a={str:"",key:null,raw:!1};if(e)if("string"==typeof e)a.str=e,e={};else{if("object"!=typeof e)return null;if("Array"===e.constructor)return null}else a.str=this.string(),e={};if(!(a=m(e,a)).str)throw new Error("A parameter is required to return an md5 hash.");return this.bimd5.md5(a.str,a.key,a.raw)},u.prototype.file=function(e){var a,n=e||{},i=Object.keys(this.get("fileExtension"));if(a=this.word({length:n.length}),n.extension)return a+"."+n.extension;if(n.extensions){if(Array.isArray(n.extensions))return a+"."+this.pickone(n.extensions);if(n.extensions.constructor===Object){var r=n.extensions,t=Object.keys(r);return a+"."+this.pickone(r[this.pickone(t)])}throw new Error("Chance: Extensions must be an Array or Object")}if(n.fileType){var o=n.fileType;if(-1!==i.indexOf(o))return a+"."+this.pickone(this.get("fileExtension")[o]);throw new RangeError("Chance: Expect file type value to be 'raster', 'vector', '3d' or 'document'")}return a+"."+this.pickone(this.get("fileExtension")[this.pickone(i)])};var b={firstNames:{male:{en:["James","John","Robert","Michael","William","David","Richard","Joseph","Charles","Thomas","Christopher","Daniel","Matthew","George","Donald","Anthony","Paul","Mark","Edward","Steven","Kenneth","Andrew","Brian","Joshua","Kevin","Ronald","Timothy","Jason","Jeffrey","Frank","Gary","Ryan","Nicholas","Eric","Stephen","Jacob","Larry","Jonathan","Scott","Raymond","Justin","Brandon","Gregory","Samuel","Benjamin","Patrick","Jack","Henry","Walter","Dennis","Jerry","Alexander","Peter","Tyler","Douglas","Harold","Aaron","Jose","Adam","Arthur","Zachary","Carl","Nathan","Albert","Kyle","Lawrence","Joe","Willie","Gerald","Roger","Keith","Jeremy","Terry","Harry","Ralph","Sean","Jesse","Roy","Louis","Billy","Austin","Bruce","Eugene","Christian","Bryan","Wayne","Russell","Howard","Fred","Ethan","Jordan","Philip","Alan","Juan","Randy","Vincent","Bobby","Dylan","Johnny","Phillip","Victor","Clarence","Ernest","Martin","Craig","Stanley","Shawn","Travis","Bradley","Leonard","Earl","Gabriel","Jimmy","Francis","Todd","Noah","Danny","Dale","Cody","Carlos","Allen","Frederick","Logan","Curtis","Alex","Joel","Luis","Norman","Marvin","Glenn","Tony","Nathaniel","Rodney","Melvin","Alfred","Steve","Cameron","Chad","Edwin","Caleb","Evan","Antonio","Lee","Herbert","Jeffery","Isaac","Derek","Ricky","Marcus","Theodore","Elijah","Luke","Jesus","Eddie","Troy","Mike","Dustin","Ray","Adrian","Bernard","Leroy","Angel","Randall","Wesley","Ian","Jared","Mason","Hunter","Calvin","Oscar","Clifford","Jay","Shane","Ronnie","Barry","Lucas","Corey","Manuel","Leo","Tommy","Warren","Jackson","Isaiah","Connor","Don","Dean","Jon","Julian","Miguel","Bill","Lloyd","Charlie","Mitchell","Leon","Jerome","Darrell","Jeremiah","Alvin","Brett","Seth","Floyd","Jim","Blake","Micheal","Gordon","Trevor","Lewis","Erik","Edgar","Vernon","Devin","Gavin","Jayden","Chris","Clyde","Tom","Derrick","Mario","Brent","Marc","Herman","Chase","Dominic","Ricardo","Franklin","Maurice","Max","Aiden","Owen","Lester","Gilbert","Elmer","Gene","Francisco","Glen","Cory","Garrett","Clayton","Sam","Jorge","Chester","Alejandro","Jeff","Harvey","Milton","Cole","Ivan","Andre","Duane","Landon"],it:["Adolfo","Alberto","Aldo","Alessandro","Alessio","Alfredo","Alvaro","Andrea","Angelo","Angiolo","Antonino","Antonio","Attilio","Benito","Bernardo","Bruno","Carlo","Cesare","Christian","Claudio","Corrado","Cosimo","Cristian","Cristiano","Daniele","Dario","David","Davide","Diego","Dino","Domenico","Duccio","Edoardo","Elia","Elio","Emanuele","Emiliano","Emilio","Enrico","Enzo","Ettore","Fabio","Fabrizio","Federico","Ferdinando","Fernando","Filippo","Francesco","Franco","Gabriele","Giacomo","Giampaolo","Giampiero","Giancarlo","Gianfranco","Gianluca","Gianmarco","Gianni","Gino","Giorgio","Giovanni","Giuliano","Giulio","Giuseppe","Graziano","Gregorio","Guido","Iacopo","Jacopo","Lapo","Leonardo","Lorenzo","Luca","Luciano","Luigi","Manuel","Marcello","Marco","Marino","Mario","Massimiliano","Massimo","Matteo","Mattia","Maurizio","Mauro","Michele","Mirko","Mohamed","Nello","Neri","Niccolò","Nicola","Osvaldo","Otello","Paolo","Pier Luigi","Piero","Pietro","Raffaele","Remo","Renato","Renzo","Riccardo","Roberto","Rolando","Romano","Salvatore","Samuele","Sandro","Sergio","Silvano","Simone","Stefano","Thomas","Tommaso","Ubaldo","Ugo","Umberto","Valerio","Valter","Vasco","Vincenzo","Vittorio"],nl:["Aaron","Abel","Adam","Adriaan","Albert","Alexander","Ali","Arjen","Arno","Bart","Bas","Bastiaan","Benjamin","Bob","Boris","Bram","Brent","Cas","Casper","Chris","Christiaan","Cornelis","Daan","Daley","Damian","Dani","Daniel","Daniël","David","Dean","Dirk","Dylan","Egbert","Elijah","Erik","Erwin","Evert","Ezra","Fabian","Fedde","Finn","Florian","Floris","Frank","Frans","Frederik","Freek","Geert","Gerard","Gerben","Gerrit","Gijs","Guus","Hans","Hendrik","Henk","Herman","Hidde","Hugo","Jaap","Jan Jaap","Jan-Willem","Jack","Jacob","Jan","Jason","Jasper","Jayden","Jelle","Jelte","Jens","Jeroen","Jesse","Jim","Job","Joep","Johannes","John","Jonathan","Joris","Joshua","Joël","Julian","Kees","Kevin","Koen","Lars","Laurens","Leendert","Lennard","Lodewijk","Luc","Luca","Lucas","Lukas","Luuk","Maarten","Marcus","Martijn","Martin","Matthijs","Maurits","Max","Mees","Melle","Mick","Mika","Milan","Mohamed","Mohammed","Morris","Muhammed","Nathan","Nick","Nico","Niek","Niels","Noah","Noud","Olivier","Oscar","Owen","Paul","Pepijn","Peter","Pieter","Pim","Quinten","Reinier","Rens","Robin","Ruben","Sam","Samuel","Sander","Sebastiaan","Sem","Sep","Sepp","Siem","Simon","Stan","Stef","Steven","Stijn","Sven","Teun","Thijmen","Thijs","Thomas","Tijn","Tim","Timo","Tobias","Tom","Victor","Vince","Willem","Wim","Wouter","Yusuf"],fr:["Aaron","Abdon","Abel","Abélard","Abelin","Abondance","Abraham","Absalon","Acace","Achaire","Achille","Adalard","Adalbald","Adalbéron","Adalbert","Adalric","Adam","Adegrin","Adel","Adelin","Andelin","Adelphe","Adam","Adéodat","Adhémar","Adjutor","Adolphe","Adonis","Adon","Adrien","Agapet","Agathange","Agathon","Agilbert","Agénor","Agnan","Aignan","Agrippin","Aimable","Aimé","Alain","Alban","Albin","Aubin","Albéric","Albert","Albertet","Alcibiade","Alcide","Alcée","Alcime","Aldonce","Aldric","Aldéric","Aleaume","Alexandre","Alexis","Alix","Alliaume","Aleaume","Almine","Almire","Aloïs","Alphée","Alphonse","Alpinien","Alverède","Amalric","Amaury","Amandin","Amant","Ambroise","Amédée","Amélien","Amiel","Amour","Anaël","Anastase","Anatole","Ancelin","Andéol","Andoche","André","Andoche","Ange","Angelin","Angilbe","Anglebert","Angoustan","Anicet","Anne","Annibal","Ansbert","Anselme","Anthelme","Antheaume","Anthime","Antide","Antoine","Antonius","Antonin","Apollinaire","Apollon","Aquilin","Arcade","Archambaud","Archambeau","Archange","Archibald","Arian","Ariel","Ariste","Aristide","Armand","Armel","Armin","Arnould","Arnaud","Arolde","Arsène","Arsinoé","Arthaud","Arthème","Arthur","Ascelin","Athanase","Aubry","Audebert","Audouin","Audran","Audric","Auguste","Augustin","Aurèle","Aurélien","Aurian","Auxence","Axel","Aymard","Aymeric","Aymon","Aymond","Balthazar","Baptiste","Barnabé","Barthélemy","Bartimée","Basile","Bastien","Baudouin","Bénigne","Benjamin","Benoît","Bérenger","Bérard","Bernard","Bertrand","Blaise","Bon","Boniface","Bouchard","Brice","Brieuc","Bruno","Brunon","Calixte","Calliste","Camélien","Camille","Camillien","Candide","Caribert","Carloman","Cassandre","Cassien","Cédric","Céleste","Célestin","Célien","Césaire","César","Charles","Charlemagne","Childebert","Chilpéric","Chrétien","Christian","Christodule","Christophe","Chrysostome","Clarence","Claude","Claudien","Cléandre","Clément","Clotaire","Côme","Constance","Constant","Constantin","Corentin","Cyprien","Cyriaque","Cyrille","Cyril","Damien","Daniel","David","Delphin","Denis","Désiré","Didier","Dieudonné","Dimitri","Dominique","Dorian","Dorothée","Edgard","Edmond","Édouard","Éleuthère","Élie","Élisée","Émeric","Émile","Émilien","Emmanuel","Enguerrand","Épiphane","Éric","Esprit","Ernest","Étienne","Eubert","Eudes","Eudoxe","Eugène","Eusèbe","Eustache","Évariste","Évrard","Fabien","Fabrice","Falba","Félicité","Félix","Ferdinand","Fiacre","Fidèle","Firmin","Flavien","Flodoard","Florent","Florentin","Florestan","Florian","Fortuné","Foulques","Francisque","François","Français","Franciscus","Francs","Frédéric","Fulbert","Fulcran","Fulgence","Gabin","Gabriel","Gaël","Garnier","Gaston","Gaspard","Gatien","Gaud","Gautier","Gédéon","Geoffroy","Georges","Géraud","Gérard","Gerbert","Germain","Gervais","Ghislain","Gilbert","Gilles","Girart","Gislebert","Gondebaud","Gonthier","Gontran","Gonzague","Grégoire","Guérin","Gui","Guillaume","Gustave","Guy","Guyot","Hardouin","Hector","Hédelin","Hélier","Henri","Herbert","Herluin","Hervé","Hilaire","Hildebert","Hincmar","Hippolyte","Honoré","Hubert","Hugues","Innocent","Isabeau","Isidore","Jacques","Japhet","Jason","Jean","Jeannel","Jeannot","Jérémie","Jérôme","Joachim","Joanny","Job","Jocelyn","Joël","Johan","Jonas","Jonathan","Joseph","Josse","Josselin","Jourdain","Jude","Judicaël","Jules","Julien","Juste","Justin","Lambert","Landry","Laurent","Lazare","Léandre","Léon","Léonard","Léopold","Leu","Loup","Leufroy","Libère","Liétald","Lionel","Loïc","Longin","Lorrain","Lorraine","Lothaire","Louis","Loup","Luc","Lucas","Lucien","Ludolphe","Ludovic","Macaire","Malo","Mamert","Manassé","Marc","Marceau","Marcel","Marcelin","Marius","Marseille","Martial","Martin","Mathurin","Matthias","Mathias","Matthieu","Maugis","Maurice","Mauricet","Maxence","Maxime","Maximilien","Mayeul","Médéric","Melchior","Mence","Merlin","Mérovée","Michaël","Michel","Moïse","Morgan","Nathan","Nathanaël","Narcisse","Néhémie","Nestor","Nestor","Nicéphore","Nicolas","Noé","Noël","Norbert","Normand","Normands","Octave","Odilon","Odon","Oger","Olivier","Oury","Pacôme","Palémon","Parfait","Pascal","Paterne","Patrice","Paul","Pépin","Perceval","Philémon","Philibert","Philippe","Philothée","Pie","Pierre","Pierrick","Prosper","Quentin","Raoul","Raphaël","Raymond","Régis","Réjean","Rémi","Renaud","René","Reybaud","Richard","Robert","Roch","Rodolphe","Rodrigue","Roger",