passfather 3.0.1 → 3.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/passfather.esm.js +15 -13
- package/dist/passfather.esm.min.js +1 -1
- package/dist/passfather.esm.min.js.LICENSE.txt +1 -1
- package/dist/passfather.js +15 -13
- package/dist/passfather.min.js +1 -1
- package/dist/passfather.min.js.LICENSE.txt +1 -1
- package/dist/passfather.min.mjs +1 -1
- package/dist/passfather.min.mjs.LICENSE.txt +1 -1
- package/dist/passfather.mjs +15 -13
- package/package.json +1 -1
- package/CHANGELOG.md +0 -40
package/dist/passfather.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.esm.js
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
|
@@ -790,7 +790,8 @@ module.exports = {
|
|
|
790
790
|
|
|
791
791
|
const {
|
|
792
792
|
compact,
|
|
793
|
-
hasWindow
|
|
793
|
+
hasWindow,
|
|
794
|
+
hasProcess
|
|
794
795
|
} = __webpack_require__(599);
|
|
795
796
|
|
|
796
797
|
const os = hasWindow() ? {} : eval(`require('os')`);
|
|
@@ -799,7 +800,7 @@ const os = hasWindow() ? {} : eval(`require('os')`);
|
|
|
799
800
|
* @const
|
|
800
801
|
*/
|
|
801
802
|
|
|
802
|
-
const DEFAULT_NODE_SEED = !hasWindow() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
803
|
+
const DEFAULT_NODE_SEED = !hasWindow() && hasProcess() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
803
804
|
/**
|
|
804
805
|
* Default seed for prng
|
|
805
806
|
* @const
|
|
@@ -827,6 +828,15 @@ const PRNGKeys = new Set(Object.keys(PRNGs));
|
|
|
827
828
|
function hasWindow() {
|
|
828
829
|
return typeof window !== 'undefined' && window.hasOwnProperty('Window') && window instanceof window.Window;
|
|
829
830
|
}
|
|
831
|
+
/**
|
|
832
|
+
* Returns true if the global environment has process
|
|
833
|
+
* @return {Boolaen}
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
function hasProcess() {
|
|
838
|
+
return typeof process !== 'undefined';
|
|
839
|
+
}
|
|
830
840
|
/**
|
|
831
841
|
* Returns crypto module for this environment
|
|
832
842
|
*/
|
|
@@ -1111,6 +1121,7 @@ function pick(arr, values) {
|
|
|
1111
1121
|
|
|
1112
1122
|
module.exports = {
|
|
1113
1123
|
hasWindow,
|
|
1124
|
+
hasProcess,
|
|
1114
1125
|
getRandomUint32,
|
|
1115
1126
|
random,
|
|
1116
1127
|
randomItem,
|
|
@@ -1188,7 +1199,6 @@ const DEFAULT_OPTIONS = {
|
|
|
1188
1199
|
*/
|
|
1189
1200
|
|
|
1190
1201
|
const OPTION_VALIDATORS = {
|
|
1191
|
-
_memo: {},
|
|
1192
1202
|
numbers: value => isBoolean(value),
|
|
1193
1203
|
uppercase: value => isBoolean(value),
|
|
1194
1204
|
lowercase: value => isBoolean(value),
|
|
@@ -1208,12 +1218,6 @@ const OPTION_VALIDATORS = {
|
|
|
1208
1218
|
* @return {Number} Error code or 0 if validation passed
|
|
1209
1219
|
*/
|
|
1210
1220
|
completely(options) {
|
|
1211
|
-
const optionsKey = Object.entries(new Object(options)).toString();
|
|
1212
|
-
|
|
1213
|
-
if (this._memo[optionsKey]) {
|
|
1214
|
-
return this._memo[optionsKey];
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
1221
|
const cases = [// [IMPORTANT] Order is important, because index of case matches with error code
|
|
1218
1222
|
() => (options === undefined || isPlainObject(options) && keys(options).length === 0) === false, () => isPlainObject(options), () => includesAll(keys(DEFAULT_OPTIONS), keys(options)), () => options.hasOwnProperty('ranges') === false || this.ranges(options.ranges), () => options.hasOwnProperty('numbers') === false || this.numbers(options.numbers), () => options.hasOwnProperty('uppercase') === false || this.uppercase(options.uppercase), () => options.hasOwnProperty('lowercase') === false || this.lowercase(options.lowercase), () => options.hasOwnProperty('symbols') === false || this.symbols(options.symbols), () => options.hasOwnProperty('length') === false || this.length(options.length), () => options.hasOwnProperty('prng') === false || this.prng(options.prng), () => options.hasOwnProperty('seed') === false || this.seed(options.seed), () => {
|
|
1219
1223
|
const opts = assign({}, DEFAULT_OPTIONS, options);
|
|
@@ -1225,8 +1229,6 @@ const OPTION_VALIDATORS = {
|
|
|
1225
1229
|
return (options.hasOwnProperty('seed') && opts.prng === 'default') === false;
|
|
1226
1230
|
}];
|
|
1227
1231
|
const result = cases.findIndex(item => item() === false);
|
|
1228
|
-
this._memo[optionsKey] = result; // Memoize result value
|
|
1229
|
-
|
|
1230
1232
|
return result;
|
|
1231
1233
|
}
|
|
1232
1234
|
|
|
@@ -1262,7 +1264,7 @@ module.exports = {
|
|
|
1262
1264
|
/***/ 876:
|
|
1263
1265
|
/***/ ((module) => {
|
|
1264
1266
|
|
|
1265
|
-
module.exports = JSON.parse('{"name":"passfather","version":"3.0.
|
|
1267
|
+
module.exports = JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}');
|
|
1266
1268
|
|
|
1267
1269
|
/***/ })
|
|
1268
1270
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see passfather.esm.min.js.LICENSE.txt */
|
|
2
|
-
var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.args=e,l.version="KISS07 0.9",l}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var l=0;l<e.length;l++)for((n-=u(e[l]))<0&&(n+=1),(r-=u(e[l]))<0&&(r+=1),(o-=u(e[l]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[l]),a[c]<0&&(a[c]+=1);var p=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return p.uint32=function(){return 4294967296*p()},p.fract53=function(){return p()+11102230246251565e-32*(2097152*p()|0)},p.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},p.version="Kybos 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var l=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return l.uint32=function(){return 4294967296*l()>>>0},l.fract53=l,l.version="LFIB4 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var l=t(),p=0;p<e.length;p++)o+=4294967296*l(e[p]),s+=4294967296*l(e[p]),a+=4294967296*l(e[p]),i+=4294967296*l(e[p]),u+=4294967296*l(e[p]),c+=4294967296*l(e[p]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,l=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.version="Xorshift03 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:l}=r(852),{DEFAULT_BROWSER_SEED:p,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function _({seed:e}){const n=Boolean(e);return a()?n?e:p:n?e:f}function y(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},l,e,y.prototype._dev.options),a=e=>{const n=m(_(r));return m(e,r.prng,n)},i=e=>{const n=m(_(r));return h(e,r.prng,m(n))},p=e=>{const n=m(_(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(p(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(p(p(f)))))).concat(b)).join("")}y.prototype._dev={options:{}},e.exports={passfather:y,DEFAULT_OPTIONS:l,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=hasWindow()?null:compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)),DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:l,isCharCode:p,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,_={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},y={_memo:{},numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&p(e[0])&&p(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){const n=Object.entries(new Object(e)).toString();if(this._memo[n])return this._memo[n];const r=[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(_),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},_,e);return l(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},_,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()));return this._memo[n]=r,r}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(_).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${l(t(_),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:y,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:_}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.1","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=;export default __webpack_require__(670);
|
|
2
|
+
var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.args=e,l.version="KISS07 0.9",l}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var l=0;l<e.length;l++)for((n-=u(e[l]))<0&&(n+=1),(r-=u(e[l]))<0&&(r+=1),(o-=u(e[l]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[l]),a[c]<0&&(a[c]+=1);var p=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return p.uint32=function(){return 4294967296*p()},p.fract53=function(){return p()+11102230246251565e-32*(2097152*p()|0)},p.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},p.version="Kybos 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var l=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return l.uint32=function(){return 4294967296*l()>>>0},l.fract53=l,l.version="LFIB4 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var l=t(),p=0;p<e.length;p++)o+=4294967296*l(e[p]),s+=4294967296*l(e[p]),a+=4294967296*l(e[p]),i+=4294967296*l(e[p]),u+=4294967296*l(e[p]),c+=4294967296*l(e[p]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,l=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.version="Xorshift03 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:l}=r(852),{DEFAULT_BROWSER_SEED:p,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function y({seed:e}){const n=Boolean(e);return a()?n?e:p:n?e:f}function _(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},l,e,_.prototype._dev.options),a=e=>{const n=m(y(r));return m(e,r.prng,n)},i=e=>{const n=m(y(r));return h(e,r.prng,m(n))},p=e=>{const n=m(y(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(p(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(p(p(f)))))).concat(b)).join("")}_.prototype._dev={options:{}},e.exports={passfather:_,DEFAULT_OPTIONS:l,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow,hasProcess}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=!hasWindow()&&hasProcess()?compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)):null,DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function hasProcess(){return"undefined"!=typeof process}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,hasProcess,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:l,isCharCode:p,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,y={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},_={numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&p(e[0])&&p(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){return[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(y),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},y,e);return l(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},y,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()))}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(y).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${l(t(y),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:_,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:y}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=;export default __webpack_require__(670);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.esm.min.js
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
package/dist/passfather.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.js
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
|
@@ -800,7 +800,8 @@ module.exports = {
|
|
|
800
800
|
|
|
801
801
|
var _require = __webpack_require__(599),
|
|
802
802
|
compact = _require.compact,
|
|
803
|
-
hasWindow = _require.hasWindow
|
|
803
|
+
hasWindow = _require.hasWindow,
|
|
804
|
+
hasProcess = _require.hasProcess;
|
|
804
805
|
|
|
805
806
|
var os = hasWindow() ? {} : eval(`require('os')`);
|
|
806
807
|
/**
|
|
@@ -808,7 +809,7 @@ var os = hasWindow() ? {} : eval(`require('os')`);
|
|
|
808
809
|
* @const
|
|
809
810
|
*/
|
|
810
811
|
|
|
811
|
-
var DEFAULT_NODE_SEED = !hasWindow() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
812
|
+
var DEFAULT_NODE_SEED = !hasWindow() && hasProcess() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
812
813
|
/**
|
|
813
814
|
* Default seed for prng
|
|
814
815
|
* @const
|
|
@@ -836,6 +837,15 @@ var PRNGKeys = new Set(Object.keys(PRNGs));
|
|
|
836
837
|
function hasWindow() {
|
|
837
838
|
return typeof window !== 'undefined' && window.hasOwnProperty('Window') && window instanceof window.Window;
|
|
838
839
|
}
|
|
840
|
+
/**
|
|
841
|
+
* Returns true if the global environment has process
|
|
842
|
+
* @return {Boolaen}
|
|
843
|
+
*/
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
function hasProcess() {
|
|
847
|
+
return typeof process !== 'undefined';
|
|
848
|
+
}
|
|
839
849
|
/**
|
|
840
850
|
* Returns crypto module for this environment
|
|
841
851
|
*/
|
|
@@ -1136,6 +1146,7 @@ function pick(arr, values) {
|
|
|
1136
1146
|
|
|
1137
1147
|
module.exports = {
|
|
1138
1148
|
hasWindow,
|
|
1149
|
+
hasProcess,
|
|
1139
1150
|
getRandomUint32,
|
|
1140
1151
|
random,
|
|
1141
1152
|
randomItem,
|
|
@@ -1211,7 +1222,6 @@ var DEFAULT_OPTIONS = {
|
|
|
1211
1222
|
*/
|
|
1212
1223
|
|
|
1213
1224
|
var OPTION_VALIDATORS = {
|
|
1214
|
-
_memo: {},
|
|
1215
1225
|
numbers: function numbers(value) {
|
|
1216
1226
|
return isBoolean(value);
|
|
1217
1227
|
},
|
|
@@ -1255,12 +1265,6 @@ var OPTION_VALIDATORS = {
|
|
|
1255
1265
|
completely(options) {
|
|
1256
1266
|
var _this = this;
|
|
1257
1267
|
|
|
1258
|
-
var optionsKey = Object.entries(new Object(options)).toString();
|
|
1259
|
-
|
|
1260
|
-
if (this._memo[optionsKey]) {
|
|
1261
|
-
return this._memo[optionsKey];
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
1268
|
var cases = [// [IMPORTANT] Order is important, because index of case matches with error code
|
|
1265
1269
|
function () {
|
|
1266
1270
|
return (options === undefined || isPlainObject(options) && keys(options).length === 0) === false;
|
|
@@ -1296,8 +1300,6 @@ var OPTION_VALIDATORS = {
|
|
|
1296
1300
|
var result = cases.findIndex(function (item) {
|
|
1297
1301
|
return item() === false;
|
|
1298
1302
|
});
|
|
1299
|
-
this._memo[optionsKey] = result; // Memoize result value
|
|
1300
|
-
|
|
1301
1303
|
return result;
|
|
1302
1304
|
}
|
|
1303
1305
|
|
|
@@ -1334,7 +1336,7 @@ module.exports = {
|
|
|
1334
1336
|
/***/ ((module) => {
|
|
1335
1337
|
|
|
1336
1338
|
"use strict";
|
|
1337
|
-
module.exports = JSON.parse('{"name":"passfather","version":"3.0.
|
|
1339
|
+
module.exports = JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}');
|
|
1338
1340
|
|
|
1339
1341
|
/***/ })
|
|
1340
1342
|
|
package/dist/passfather.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see passfather.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("passfather",[],n):"object"==typeof exports?exports.passfather=n():e.passfather=n()}(this,(function(){return(()=>{var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},p=function(){return 2.3283064365386963e-10*c()};return p.uint32=c,p.fract53=function(){return p()+11102230246251565e-32*(2097151&c())},p.args=e,p.version="KISS07 0.9",p}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var p=0;p<e.length;p++)for((n-=u(e[p]))<0&&(n+=1),(r-=u(e[p]))<0&&(r+=1),(o-=u(e[p]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[p]),a[c]<0&&(a[c]+=1);var l=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return l.uint32=function(){return 4294967296*l()},l.fract53=function(){return l()+11102230246251565e-32*(2097152*l()|0)},l.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},l.version="Kybos 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var p=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return p.uint32=function(){return 4294967296*p()>>>0},p.fract53=p,p.version="LFIB4 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var p=t(),l=0;l<e.length;l++)o+=4294967296*p(e[l]),s+=4294967296*p(e[l]),a+=4294967296*p(e[l]),i+=4294967296*p(e[l]),u+=4294967296*p(e[l]),c+=4294967296*p(e[l]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,p=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},p=function(){return 2.3283064365386963e-10*c()};return p.uint32=c,p.fract53=function(){return p()+11102230246251565e-32*(2097151&c())},p.version="Xorshift03 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:p}=r(852),{DEFAULT_BROWSER_SEED:l,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function _({seed:e}){const n=Boolean(e);return a()?n?e:l:n?e:f}function y(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},p,e,y.prototype._dev.options),a=e=>{const n=m(_(r));return m(e,r.prng,n)},i=e=>{const n=m(_(r));return h(e,r.prng,m(n))},l=e=>{const n=m(_(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(l(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(l(l(f)))))).concat(b)).join("")}y.prototype._dev={options:{}},e.exports={passfather:y,DEFAULT_OPTIONS:p,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=hasWindow()?null:compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)),DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:p,isCharCode:l,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,_={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},y={_memo:{},numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&l(e[0])&&l(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){const n=Object.entries(new Object(e)).toString();if(this._memo[n])return this._memo[n];const r=[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(_),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},_,e);return p(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},_,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()));return this._memo[n]=r,r}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(_).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${p(t(_),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:y,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:_}},876:e=>{"use strict";e.exports=JSON.parse('{"name":"passfather","version":"3.0.1","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__(670);return __webpack_exports__})()}));
|
|
2
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("passfather",[],n):"object"==typeof exports?exports.passfather=n():e.passfather=n()}(this,(function(){return(()=>{var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},p=function(){return 2.3283064365386963e-10*c()};return p.uint32=c,p.fract53=function(){return p()+11102230246251565e-32*(2097151&c())},p.args=e,p.version="KISS07 0.9",p}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var p=0;p<e.length;p++)for((n-=u(e[p]))<0&&(n+=1),(r-=u(e[p]))<0&&(r+=1),(o-=u(e[p]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[p]),a[c]<0&&(a[c]+=1);var l=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return l.uint32=function(){return 4294967296*l()},l.fract53=function(){return l()+11102230246251565e-32*(2097152*l()|0)},l.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},l.version="Kybos 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var p=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return p.uint32=function(){return 4294967296*p()>>>0},p.fract53=p,p.version="LFIB4 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var p=t(),l=0;l<e.length;l++)o+=4294967296*p(e[l]),s+=4294967296*p(e[l]),a+=4294967296*p(e[l]),i+=4294967296*p(e[l]),u+=4294967296*p(e[l]),c+=4294967296*p(e[l]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,p=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},p=function(){return 2.3283064365386963e-10*c()};return p.uint32=c,p.fract53=function(){return p()+11102230246251565e-32*(2097151&c())},p.version="Xorshift03 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:p}=r(852),{DEFAULT_BROWSER_SEED:l,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function _({seed:e}){const n=Boolean(e);return a()?n?e:l:n?e:f}function y(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},p,e,y.prototype._dev.options),a=e=>{const n=m(_(r));return m(e,r.prng,n)},i=e=>{const n=m(_(r));return h(e,r.prng,m(n))},l=e=>{const n=m(_(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(l(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(l(l(f)))))).concat(b)).join("")}y.prototype._dev={options:{}},e.exports={passfather:y,DEFAULT_OPTIONS:p,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow,hasProcess}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=!hasWindow()&&hasProcess()?compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)):null,DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function hasProcess(){return"undefined"!=typeof process}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,hasProcess,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:p,isCharCode:l,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,_={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},y={numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&l(e[0])&&l(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){return[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(_),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},_,e);return p(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},_,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()))}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(_).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${p(t(_),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:y,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:_}},876:e=>{"use strict";e.exports=JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__(670);return __webpack_exports__})()}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.min.js
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
package/dist/passfather.min.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see passfather.min.mjs.LICENSE.txt */
|
|
2
|
-
var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.args=e,l.version="KISS07 0.9",l}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var l=0;l<e.length;l++)for((n-=u(e[l]))<0&&(n+=1),(r-=u(e[l]))<0&&(r+=1),(o-=u(e[l]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[l]),a[c]<0&&(a[c]+=1);var p=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return p.uint32=function(){return 4294967296*p()},p.fract53=function(){return p()+11102230246251565e-32*(2097152*p()|0)},p.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},p.version="Kybos 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var l=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return l.uint32=function(){return 4294967296*l()>>>0},l.fract53=l,l.version="LFIB4 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var l=t(),p=0;p<e.length;p++)o+=4294967296*l(e[p]),s+=4294967296*l(e[p]),a+=4294967296*l(e[p]),i+=4294967296*l(e[p]),u+=4294967296*l(e[p]),c+=4294967296*l(e[p]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,l=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.version="Xorshift03 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:l}=r(852),{DEFAULT_BROWSER_SEED:p,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function _({seed:e}){const n=Boolean(e);return a()?n?e:p:n?e:f}function y(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},l,e,y.prototype._dev.options),a=e=>{const n=m(_(r));return m(e,r.prng,n)},i=e=>{const n=m(_(r));return h(e,r.prng,m(n))},p=e=>{const n=m(_(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(p(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(p(p(f)))))).concat(b)).join("")}y.prototype._dev={options:{}},e.exports={passfather:y,DEFAULT_OPTIONS:l,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=hasWindow()?null:compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)),DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:l,isCharCode:p,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,_={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},y={_memo:{},numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&p(e[0])&&p(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){const n=Object.entries(new Object(e)).toString();if(this._memo[n])return this._memo[n];const r=[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(_),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},_,e);return l(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},_,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()));return this._memo[n]=r,r}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(_).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${l(t(_),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:y,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:_}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.1","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=;export default __webpack_require__(670);
|
|
2
|
+
var __webpack_modules__={544:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=0,o=0,s=1;0==e.length&&(e=[+new Date]);var a=t();n=a(" "),r=a(" "),o=a(" ");for(var i=0;i<e.length;i++)(n-=a(e[i]))<0&&(n+=1),(r-=a(e[i]))<0&&(r+=1),(o-=a(e[i]))<0&&(o+=1);a=null;var u=function(){var e=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=e-(s=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.version="Alea 0.9",u.args=e,u}(Array.prototype.slice.call(arguments))}},825:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=21288629,s=14921776,a=0;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),s^=4294967296*i(e[u]);0===r&&(r=1),a^=o>>>31,(o&=2147483647)%7559==0&&o++,(s&=2147483647)%7559==0&&s++,i=null;var c=function(){var e;return n+=545925293,r^=r<<13,r^=r>>>17,e=o+s+a,o=s,a=e>>>31,(n>>>=0)+(r^=r<<5)+(s=2147483647&e)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.args=e,l.version="KISS07 0.9",l}(Array.prototype.slice.call(arguments))}},139:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){for(var n=0,r=0,o=0,s=1,a=[],i=0,u=t(),c=(n=u(" "),r=u(" "),o=u(" "),0);c<8;c++)a[c]=u(" ");0==e.length&&(e=[+new Date]);for(var l=0;l<e.length;l++)for((n-=u(e[l]))<0&&(n+=1),(r-=u(e[l]))<0&&(r+=1),(o-=u(e[l]))<0&&(o+=1),c=0;c<8;c++)a[c]-=u(e[l]),a[c]<0&&(a[c]+=1);var p=function(){i=8*a[i]|0;var e=a[i],t=2091639*n+2.3283064365386963e-10*s;return n=r,r=o,o=t-(s=0|t),a[i]-=o,a[i]<0&&(a[i]+=1),e};return p.uint32=function(){return 4294967296*p()},p.fract53=function(){return p()+11102230246251565e-32*(2097152*p()|0)},p.addNoise=function(){for(var e=arguments.length-1;e>=0;e--)for(c=0;c<8;c++)a[c]-=u(arguments[e]),a[c]<0&&(a[c]+=1)},p.version="Kybos 0.9",p.args=e,p}(Array.prototype.slice.call(arguments))}},105:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=0,r=58,o=119,s=178,a=[],i=t();0===e.length&&(e=[+new Date]);for(var u=0;u<256;u++)a[u]=i(" "),a[u]-=4.76837158203125e-7*i(" "),a[u]<0&&(a[u]+=1);for(var c=0;c<e.length;c++)for(u=0;u<256;u++)a[u]-=i(e[c]),a[u]-=4.76837158203125e-7*i(e[c]),a[u]<0&&(a[u]+=1);i=null;var l=function(){var e;return r=r+1&255,o=o+1&255,s=s+1&255,(e=a[n=n+1&255]-a[r])<0&&(e+=1),(e-=a[o])<0&&(e+=1),(e-=a[s])<0&&(e+=1),a[n]=e};return l.uint32=function(){return 4294967296*l()>>>0},l.fract53=l,l.version="LFIB4 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},247:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=255,r=52,o=0,s=[],a=t();0===e.length&&(e=[+new Date]);for(var i=0;i<256;i++)s[i]=a(" "),s[i]-=4.76837158203125e-7*a(" "),s[i]<0&&(s[i]+=1);for(var u=0;u<e.length;u++)for(i=0;i<256;i++)s[i]-=a(e[u]),s[i]-=4.76837158203125e-7*a(e[u]),s[i]<0&&(s[i]+=1);a=null;var c=function(){r=r+1&255,o=o+1&255;var e=s[n=n+1&255]-s[r];return e<0&&(e+=1),(e-=s[o])<0&&(e+=1),s[n]=e};return c.uint32=function(){return 4294967296*c()>>>0},c.fract53=c,c.version="LFib 0.9",c.args=e,c}(Array.prototype.slice.call(arguments))}},759:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=4294967087,r=4294944443,o=12345,s=12345,a=123,i=12345,u=12345,c=123;0===e.length&&(e=[+new Date]);for(var l=t(),p=0;p<e.length;p++)o+=4294967296*l(e[p]),s+=4294967296*l(e[p]),a+=4294967296*l(e[p]),i+=4294967296*l(e[p]),u+=4294967296*l(e[p]),c+=4294967296*l(e[p]);o%=n,s%=n,a%=n,i%=r,u%=r,c%=r,l=null;var f=function(){var e,n,r=4294967087,t=4294944443;return e=1403580*s-810728*o,(e-=(e/r|0)*r)<0&&(e+=r),o=s,s=a,a=e,n=527612*c-1370589*i,(n-=(n/t|0)*t)<0&&(n+=t),i=u,u=c,c=n,e<=n?e-n+r:e-n},h=function(){return 2.3283064365386963e-10*f()};return h.uint32=f,h.fract53=function(){return h()+11102230246251565e-32*(2097151&f())},h.version="MRG32k3a 0.9",h.args=e,h}(Array.prototype.slice.call(arguments))}},165:e=>{e.exports=function(){var e=4022871197,n=function(n){n=n.toString();for(var r=0;r<n.length;r++){var t=.02519603282416938*(e+=n.charCodeAt(r));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}},779:(e,n,r)=>{const t=r(165);e.exports=function(){return function(e){var n=123456789,r=362436069,o=521288629,s=88675123,a=886756453;0==e.length&&(e=[+new Date]);for(var i=t(),u=0;u<e.length;u++)n^=4294967296*i(e[u]),r^=4294967296*i(e[u]),o^=4294967296*i(e[u]),a^=4294967296*i(e[u]),s^=4294967296*i(e[u]);i=null;var c=function(){var e=(n^n>>>7)>>>0;return n=r,r=o,o=s,s=a,(r+r+1)*(a=a^a<<6^(e^e<<13)>>>0)>>>0},l=function(){return 2.3283064365386963e-10*c()};return l.uint32=c,l.fract53=function(){return l()+11102230246251565e-32*(2097151&c())},l.version="Xorshift03 0.9",l.args=e,l}(Array.prototype.slice.call(arguments))}},664:(e,n,r)=>{const t=r(544),o=r(825),s=r(139),a=r(247),i=r(105),u=r(759),c=r(779);e.exports={Alea:t,KISS07:o,Kybos:s,LFib:a,LFIB4:i,MRG32k3a:u,Xorshift03:c}},670:(e,n,r)=>{const{passfather:t}=r(344);e.exports=t},344:(e,n,r)=>{const{compact:t,assign:o,timesMap:s,hasWindow:a,...i}=r(599),{OPTION_VALIDATORS:u,ERROR_MESSAGES:c,DEFAULT_OPTIONS:l}=r(852),{DEFAULT_BROWSER_SEED:p,DEFAULT_NODE_SEED:f}=r(680),h=i.random,d=i.randomItem,m=i.shuffle,g=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function y({seed:e}){const n=Boolean(e);return a()?n?e:p:n?e:f}function _(e){const n=u.completely(e);if(n>0)throw c[n];const r=o({},l,e,_.prototype._dev.options),a=e=>{const n=m(y(r));return m(e,r.prng,n)},i=e=>{const n=m(y(r));return h(e,r.prng,m(n))},p=e=>{const n=m(y(r));return d(e,r.prng,m(n))},f=function(e){return t([].concat(e.numbers&&[g[0]],e.uppercase&&[g[1]],e.lowercase&&[g[2]],e.symbols&&[g[3]],e.ranges&&e.ranges))}(r),b=s(f.length,((e,n)=>String.fromCharCode(i(p(f[n])))));return b.length>=r.length?a(b).slice(0,r.length).join(""):a(s(r.length-b.length,(()=>String.fromCharCode(i(p(p(f)))))).concat(b)).join("")}_.prototype._dev={options:{}},e.exports={passfather:_,DEFAULT_OPTIONS:l,CHAR_RANGES:g,ERROR_MESSAGES:c}},680:(module,__unused_webpack_exports,__webpack_require__)=>{const{compact,hasWindow,hasProcess}=__webpack_require__(599),os=hasWindow()?{}:eval("require('os')"),DEFAULT_NODE_SEED=!hasWindow()&&hasProcess()?compact([].concat(Date.now(),process.memoryUsage?[process.memoryUsage().heapTotal,process.memoryUsage().heapUsed]:null,process.env?[process.arch,process.platform,os.cpus().length,os.totalmem()]:null)):null,DEFAULT_BROWSER_SEED=hasWindow()?compact([].concat(Date.now(),performance&&performance.memory?[performance.memory.totalJSHeapSize,performance.memory.usedJSHeapSize]:null,navigator?[navigator.userAgent,navigator.appVersion,navigator.hardwareConcurrency,navigator.deviceMemory]:null)):null;module.exports={DEFAULT_NODE_SEED,DEFAULT_BROWSER_SEED}},599:(module,__unused_webpack_exports,__webpack_require__)=>{const PRNGs=__webpack_require__(664),PRNGKeys=new Set(Object.keys(PRNGs));function hasWindow(){return"undefined"!=typeof window&&window.hasOwnProperty("Window")&&window instanceof window.Window}function hasProcess(){return"undefined"!=typeof process}function getCrypto(){return hasWindow()?window.crypto:eval("require('crypto')")}function getRandomUint32(e,n){const r=PRNGKeys.has(e);if(e&&"default"!==e&&!r&&console.warn(`PRNG ${e} is not supported`),e&&"default"!==e&&PRNGKeys.has(e))return(n?new PRNGs[e](n):new PRNGs[e]).uint32();const t=getCrypto();return hasWindow()?t.getRandomValues(new Uint32Array(1))[0]:parseInt(t.randomBytes(4).toString("hex"),16)}function random(e,n,r){const t=getRandomUint32(n,r),o=e[1]-e[0]+1;return t>=Math.floor(4294967295/o)*o?random(e):e[0]+t%o}function randomItem(e,n,r){return e[random([0,e.length-1],n,r)]}function without(e,n){return e.filter((e=>!1===n.includes(e)))}function includes(e,n){return e.some((e=>n.includes(e)))}function includesAll(e,n){return!1===n.some((n=>!1===e.includes(n)))}function excludes(e,n){return!1===e.some((e=>n.includes(e)))}function lastIndex(e){return e.length-1}function compact(e){return e.filter(Boolean)}function isBoolean(e){return!0===e||!1===e}function isArray(e){return e instanceof Array}function keys(e){return Object.keys(e)}function isInteger(e){return Number.isInteger(e)}function isNumber(e){return"number"==typeof e&&!1===isNaN(e)}function isString(e){return"string"==typeof e}function isPlainObject(e){try{return!0===/^\{.*\}$/.test(JSON.stringify(e))&&e instanceof Map==0}catch(e){return!1}}function assign(){return Object.assign.apply(Object,arguments)}function timesMap(e,n){return Array(e).fill().map(n)}function numSequence(e,n,r){return t=timesMap(n-e,((n,r)=>e+r)),r?t.push(n)&&t:t;var t}function shuffle(e,n,r){return e.length<=1||timesMap(e.length,((t,o)=>{const s=random([0,e.length-1],n,r);[e[o],e[s]]=[e[s],e[o]]})),e}function getCharsByDiapason(e){return String.fromCodePoint.apply(String,numSequence(e[0],e[1],!0))}function isCharCode(e){return String.fromCharCode(e)!==String.fromCharCode(!1)}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pick(e,n){return e.filter((e=>n.includes(e)))}module.exports={hasWindow,hasProcess,getRandomUint32,random,randomItem,without,includes,includesAll,excludes,lastIndex,compact,keys,isInteger,isNumber,isString,isBoolean,isArray,isPlainObject,assign,timesMap,numSequence,shuffle,getCharsByDiapason,isCharCode,escapeRegExp}},852:(e,n,r)=>{const{keys:t,isInteger:o,includesAll:s,isBoolean:a,isArray:i,isPlainObject:u,assign:c,without:l,isCharCode:p,isString:f,isNumber:h}=r(599),d=r(664),{name:m}=r(876),g=m,y={numbers:!0,uppercase:!0,lowercase:!0,symbols:!0,length:12,ranges:null,prng:"default",seed:null},_={numbers:e=>a(e),uppercase:e=>a(e),lowercase:e=>a(e),symbols:e=>a(e),length:e=>o(e)&&e>0,ranges:e=>i(e)&&e.length>0&&e.every((e=>{return i(n=e)&&n.length>0&&n.every((e=>i(e)&&p(e[0])&&p(e[1])));var n})),prng:e=>["default"].concat(t(d)).includes(e),seed:e=>i(e)&&e.length>0&&!1===e.some((e=>!f(e)&&!h(e))),completely(e){return[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(y),t(e)),()=>!1===e.hasOwnProperty("ranges")||this.ranges(e.ranges),()=>!1===e.hasOwnProperty("numbers")||this.numbers(e.numbers),()=>!1===e.hasOwnProperty("uppercase")||this.uppercase(e.uppercase),()=>!1===e.hasOwnProperty("lowercase")||this.lowercase(e.lowercase),()=>!1===e.hasOwnProperty("symbols")||this.symbols(e.symbols),()=>!1===e.hasOwnProperty("length")||this.length(e.length),()=>!1===e.hasOwnProperty("prng")||this.prng(e.prng),()=>!1===e.hasOwnProperty("seed")||this.seed(e.seed),()=>{const n=c({},y,e);return l(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},y,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()))}},b=[];b[0]="No errors",b[1]=`[${g}]: Option must be an object`,b[2]=`[${g}]: Options must contains only one (or several) of [${t(y).join(", ")}]`,b[3]=`[${g}]: Option "ranges" must be array with array of UTF-8 char code range. For example: [ [[48, 57 ]], [[33, 46], [58, 64], [94, 96], [123, 126]] ] `,b[4]=`[${g}]: Option "numbers" must be boolean`,b[5]=`[${g}]: Option "uppercase" must be boolean`,b[6]=`[${g}]: Option "lowercase" must be boolean`,b[7]=`[${g}]: Option "symbols" must be boolean`,b[8]=`[${g}]: Option "length" must be integer greater than 0`,b[9]=`[${g}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${g}]: Option "seed" must be array of strings or numbers`,b[11]=`[${g}]: At less one of options [${l(t(y),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${g}]: Option "seed" cannot be used when "prng" option is default. Set "prng" option to one of [${t(d).join(", ")}]`,e.exports={OPTION_VALIDATORS:_,ERROR_MESSAGES:b,MODULE_NAME:g,DEFAULT_OPTIONS:y}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}')}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=;export default __webpack_require__(670);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.min.mjs
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
package/dist/passfather.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.mjs
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.0
|
|
4
4
|
* @description Passfather is very fast and powerful utility with zero dependencies to generate strong password
|
|
5
5
|
* @copyright Copyright (c) 2019-present, Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)
|
|
6
6
|
* @license
|
|
@@ -790,7 +790,8 @@ module.exports = {
|
|
|
790
790
|
|
|
791
791
|
const {
|
|
792
792
|
compact,
|
|
793
|
-
hasWindow
|
|
793
|
+
hasWindow,
|
|
794
|
+
hasProcess
|
|
794
795
|
} = __webpack_require__(599);
|
|
795
796
|
|
|
796
797
|
const os = hasWindow() ? {} : eval(`require('os')`);
|
|
@@ -799,7 +800,7 @@ const os = hasWindow() ? {} : eval(`require('os')`);
|
|
|
799
800
|
* @const
|
|
800
801
|
*/
|
|
801
802
|
|
|
802
|
-
const DEFAULT_NODE_SEED = !hasWindow() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
803
|
+
const DEFAULT_NODE_SEED = !hasWindow() && hasProcess() ? compact([].concat(Date.now(), process.memoryUsage ? [process.memoryUsage().heapTotal, process.memoryUsage().heapUsed] : null, process.env ? [process.arch, process.platform, os.cpus().length, os.totalmem()] : null)) : null;
|
|
803
804
|
/**
|
|
804
805
|
* Default seed for prng
|
|
805
806
|
* @const
|
|
@@ -827,6 +828,15 @@ const PRNGKeys = new Set(Object.keys(PRNGs));
|
|
|
827
828
|
function hasWindow() {
|
|
828
829
|
return typeof window !== 'undefined' && window.hasOwnProperty('Window') && window instanceof window.Window;
|
|
829
830
|
}
|
|
831
|
+
/**
|
|
832
|
+
* Returns true if the global environment has process
|
|
833
|
+
* @return {Boolaen}
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
function hasProcess() {
|
|
838
|
+
return typeof process !== 'undefined';
|
|
839
|
+
}
|
|
830
840
|
/**
|
|
831
841
|
* Returns crypto module for this environment
|
|
832
842
|
*/
|
|
@@ -1111,6 +1121,7 @@ function pick(arr, values) {
|
|
|
1111
1121
|
|
|
1112
1122
|
module.exports = {
|
|
1113
1123
|
hasWindow,
|
|
1124
|
+
hasProcess,
|
|
1114
1125
|
getRandomUint32,
|
|
1115
1126
|
random,
|
|
1116
1127
|
randomItem,
|
|
@@ -1188,7 +1199,6 @@ const DEFAULT_OPTIONS = {
|
|
|
1188
1199
|
*/
|
|
1189
1200
|
|
|
1190
1201
|
const OPTION_VALIDATORS = {
|
|
1191
|
-
_memo: {},
|
|
1192
1202
|
numbers: value => isBoolean(value),
|
|
1193
1203
|
uppercase: value => isBoolean(value),
|
|
1194
1204
|
lowercase: value => isBoolean(value),
|
|
@@ -1208,12 +1218,6 @@ const OPTION_VALIDATORS = {
|
|
|
1208
1218
|
* @return {Number} Error code or 0 if validation passed
|
|
1209
1219
|
*/
|
|
1210
1220
|
completely(options) {
|
|
1211
|
-
const optionsKey = Object.entries(new Object(options)).toString();
|
|
1212
|
-
|
|
1213
|
-
if (this._memo[optionsKey]) {
|
|
1214
|
-
return this._memo[optionsKey];
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
1221
|
const cases = [// [IMPORTANT] Order is important, because index of case matches with error code
|
|
1218
1222
|
() => (options === undefined || isPlainObject(options) && keys(options).length === 0) === false, () => isPlainObject(options), () => includesAll(keys(DEFAULT_OPTIONS), keys(options)), () => options.hasOwnProperty('ranges') === false || this.ranges(options.ranges), () => options.hasOwnProperty('numbers') === false || this.numbers(options.numbers), () => options.hasOwnProperty('uppercase') === false || this.uppercase(options.uppercase), () => options.hasOwnProperty('lowercase') === false || this.lowercase(options.lowercase), () => options.hasOwnProperty('symbols') === false || this.symbols(options.symbols), () => options.hasOwnProperty('length') === false || this.length(options.length), () => options.hasOwnProperty('prng') === false || this.prng(options.prng), () => options.hasOwnProperty('seed') === false || this.seed(options.seed), () => {
|
|
1219
1223
|
const opts = assign({}, DEFAULT_OPTIONS, options);
|
|
@@ -1225,8 +1229,6 @@ const OPTION_VALIDATORS = {
|
|
|
1225
1229
|
return (options.hasOwnProperty('seed') && opts.prng === 'default') === false;
|
|
1226
1230
|
}];
|
|
1227
1231
|
const result = cases.findIndex(item => item() === false);
|
|
1228
|
-
this._memo[optionsKey] = result; // Memoize result value
|
|
1229
|
-
|
|
1230
1232
|
return result;
|
|
1231
1233
|
}
|
|
1232
1234
|
|
|
@@ -1262,7 +1264,7 @@ module.exports = {
|
|
|
1262
1264
|
/***/ 876:
|
|
1263
1265
|
/***/ ((module) => {
|
|
1264
1266
|
|
|
1265
|
-
module.exports = JSON.parse('{"name":"passfather","version":"3.0.
|
|
1267
|
+
module.exports = JSON.parse('{"name":"passfather","version":"3.0.2-beta.0","description":"Passfather is very fast and powerful utility with zero dependencies to generate strong password","author":"Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)","contributors":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"maintainers":["Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)"],"repository":{"type":"git","url":"https://github.com/vyushin/passfather"},"scripts":{"install-all":"cd ./build && npm install && cd ../test && npm install","build:cdn":"cd ./build && npm run build:cdn","build:umd":"cd ./build && npm run build:umd","build":"cd ./build && npm run build","pretest":"npm run build","test":"cd ./test && npm test","prepublish":"npm test"},"bugs":{"url":"https://github.com/vyushin/passfather/issues"},"homepage":"https://github.com/vyushin/passfather","main":"./dist/passfather.js","module":"./dist/passfather.esm.js","types":"./dist/passfather.d.ts","license":"MIT","keywords":["password","generator","passgen"],"directories":{"doc":"./README.md"},"devDependencies":{}}');
|
|
1266
1268
|
|
|
1267
1269
|
/***/ })
|
|
1268
1270
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passfather",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2-beta.0",
|
|
4
4
|
"description": "Passfather is very fast and powerful utility with zero dependencies to generate strong password",
|
|
5
5
|
"author": "Evgeny Vyushin <e@vyushin.ru> (https://github.com/vyushin)",
|
|
6
6
|
"contributors": [
|
package/CHANGELOG.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
## 3.0.1 (August 24, 2021)
|
|
2
|
-
* Update README.md
|
|
3
|
-
|
|
4
|
-
## 3.0.0 (August 23, 2021)
|
|
5
|
-
* Improve PRNG algorithm
|
|
6
|
-
* Make new test for each of PRNG algorithm
|
|
7
|
-
* Memoize option validation result, up performance
|
|
8
|
-
|
|
9
|
-
## 2.1.3 (October 04, 2020)
|
|
10
|
-
* Add missing typescript declaration in dist directory
|
|
11
|
-
|
|
12
|
-
## 2.1.2 (October 04, 2020)
|
|
13
|
-
* Add .esm.js bundle to module of package.json (instead .mjs) for more compatibility
|
|
14
|
-
|
|
15
|
-
## 2.1.1 (September 21, 2020)
|
|
16
|
-
|
|
17
|
-
* Add semver to unpkg links
|
|
18
|
-
* Add module property to package.json
|
|
19
|
-
|
|
20
|
-
## 2.1.0 (September 21, 2020)
|
|
21
|
-
|
|
22
|
-
* Improve build
|
|
23
|
-
* Add ESM support
|
|
24
|
-
* Code refactoring
|
|
25
|
-
* Other improvements
|
|
26
|
-
|
|
27
|
-
## 2.0.0 (December 25, 2019)
|
|
28
|
-
|
|
29
|
-
* Add multiple pseudorandom number generators
|
|
30
|
-
* Code refactoring
|
|
31
|
-
|
|
32
|
-
## 1.4.1 (November 17, 2019)
|
|
33
|
-
|
|
34
|
-
* Possibility to generate password with custom char ranges
|
|
35
|
-
|
|
36
|
-
## 1.3.1 (September 17, 2019)
|
|
37
|
-
|
|
38
|
-
* Improved TS declaration file
|
|
39
|
-
* Add TS declaration path to `package.json`
|
|
40
|
-
* Add `CHANGELOG.md`
|