passfather 3.0.0 → 3.0.2-beta.2
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/README.md +2 -2
- package/dist/passfather.esm.js +57 -28
- 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 +57 -28
- package/package.json +5 -3
- package/CHANGELOG.md +0 -37
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ By default using [getRandomValues](https://developer.mozilla.org/ru/docs/Web/API
|
|
|
32
32
|
###### ESM
|
|
33
33
|
```html
|
|
34
34
|
<script type="module">
|
|
35
|
-
import passfather from 'https://unpkg.com/passfather@^
|
|
35
|
+
import passfather from 'https://unpkg.com/passfather@^3.0.0/dist/passfather.min.mjs'
|
|
36
36
|
console.log( passfather() ); // Output "vFR_@1hDMhAr"
|
|
37
37
|
</script>
|
|
38
38
|
```
|
|
@@ -40,7 +40,7 @@ By default using [getRandomValues](https://developer.mozilla.org/ru/docs/Web/API
|
|
|
40
40
|
###### UMD
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
|
-
<script src="https://unpkg.com/passfather@^
|
|
43
|
+
<script src="https://unpkg.com/passfather@^3.0.0/dist/passfather.min.js"></script>
|
|
44
44
|
<script>
|
|
45
45
|
console.log( passfather() ); // Output "r_@1hDvFRMhA"
|
|
46
46
|
</script>
|
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.1
|
|
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
|
|
@@ -658,17 +658,6 @@ module.exports = {
|
|
|
658
658
|
|
|
659
659
|
/***/ }),
|
|
660
660
|
|
|
661
|
-
/***/ 670:
|
|
662
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
663
|
-
|
|
664
|
-
const {
|
|
665
|
-
passfather
|
|
666
|
-
} = __webpack_require__(344);
|
|
667
|
-
|
|
668
|
-
module.exports = passfather;
|
|
669
|
-
|
|
670
|
-
/***/ }),
|
|
671
|
-
|
|
672
661
|
/***/ 344:
|
|
673
662
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
674
663
|
|
|
@@ -790,7 +779,8 @@ module.exports = {
|
|
|
790
779
|
|
|
791
780
|
const {
|
|
792
781
|
compact,
|
|
793
|
-
hasWindow
|
|
782
|
+
hasWindow,
|
|
783
|
+
hasProcess
|
|
794
784
|
} = __webpack_require__(599);
|
|
795
785
|
|
|
796
786
|
const os = hasWindow() ? {} : eval(`require('os')`);
|
|
@@ -799,7 +789,7 @@ const os = hasWindow() ? {} : eval(`require('os')`);
|
|
|
799
789
|
* @const
|
|
800
790
|
*/
|
|
801
791
|
|
|
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;
|
|
792
|
+
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
793
|
/**
|
|
804
794
|
* Default seed for prng
|
|
805
795
|
* @const
|
|
@@ -827,6 +817,15 @@ const PRNGKeys = new Set(Object.keys(PRNGs));
|
|
|
827
817
|
function hasWindow() {
|
|
828
818
|
return typeof window !== 'undefined' && window.hasOwnProperty('Window') && window instanceof window.Window;
|
|
829
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* Returns true if the global environment has process
|
|
822
|
+
* @return {Boolaen}
|
|
823
|
+
*/
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
function hasProcess() {
|
|
827
|
+
return typeof process !== 'undefined';
|
|
828
|
+
}
|
|
830
829
|
/**
|
|
831
830
|
* Returns crypto module for this environment
|
|
832
831
|
*/
|
|
@@ -1111,6 +1110,7 @@ function pick(arr, values) {
|
|
|
1111
1110
|
|
|
1112
1111
|
module.exports = {
|
|
1113
1112
|
hasWindow,
|
|
1113
|
+
hasProcess,
|
|
1114
1114
|
getRandomUint32,
|
|
1115
1115
|
random,
|
|
1116
1116
|
randomItem,
|
|
@@ -1188,7 +1188,6 @@ const DEFAULT_OPTIONS = {
|
|
|
1188
1188
|
*/
|
|
1189
1189
|
|
|
1190
1190
|
const OPTION_VALIDATORS = {
|
|
1191
|
-
_memo: {},
|
|
1192
1191
|
numbers: value => isBoolean(value),
|
|
1193
1192
|
uppercase: value => isBoolean(value),
|
|
1194
1193
|
lowercase: value => isBoolean(value),
|
|
@@ -1208,12 +1207,6 @@ const OPTION_VALIDATORS = {
|
|
|
1208
1207
|
* @return {Number} Error code or 0 if validation passed
|
|
1209
1208
|
*/
|
|
1210
1209
|
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
1210
|
const cases = [// [IMPORTANT] Order is important, because index of case matches with error code
|
|
1218
1211
|
() => (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
1212
|
const opts = assign({}, DEFAULT_OPTIONS, options);
|
|
@@ -1225,8 +1218,6 @@ const OPTION_VALIDATORS = {
|
|
|
1225
1218
|
return (options.hasOwnProperty('seed') && opts.prng === 'default') === false;
|
|
1226
1219
|
}];
|
|
1227
1220
|
const result = cases.findIndex(item => item() === false);
|
|
1228
|
-
this._memo[optionsKey] = result; // Memoize result value
|
|
1229
|
-
|
|
1230
1221
|
return result;
|
|
1231
1222
|
}
|
|
1232
1223
|
|
|
@@ -1262,7 +1253,7 @@ module.exports = {
|
|
|
1262
1253
|
/***/ 876:
|
|
1263
1254
|
/***/ ((module) => {
|
|
1264
1255
|
|
|
1265
|
-
module.exports = JSON.parse('{"name":"passfather","version":"3.0.
|
|
1256
|
+
module.exports = JSON.parse('{"name":"passfather","version":"3.0.2-beta.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"},"dependencies":{"serve":"^13.0.2"}}');
|
|
1266
1257
|
|
|
1267
1258
|
/***/ })
|
|
1268
1259
|
|
|
@@ -1293,9 +1284,47 @@ module.exports = JSON.parse('{"name":"passfather","version":"3.0.0","description
|
|
|
1293
1284
|
/******/ }
|
|
1294
1285
|
/******/
|
|
1295
1286
|
/************************************************************************/
|
|
1287
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
1288
|
+
/******/ (() => {
|
|
1289
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1290
|
+
/******/ __webpack_require__.n = (module) => {
|
|
1291
|
+
/******/ var getter = module && module.__esModule ?
|
|
1292
|
+
/******/ () => (module['default']) :
|
|
1293
|
+
/******/ () => (module);
|
|
1294
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
1295
|
+
/******/ return getter;
|
|
1296
|
+
/******/ };
|
|
1297
|
+
/******/ })();
|
|
1296
1298
|
/******/
|
|
1297
|
-
/******/
|
|
1298
|
-
/******/
|
|
1299
|
-
/******/
|
|
1300
|
-
/******/
|
|
1299
|
+
/******/ /* webpack/runtime/define property getters */
|
|
1300
|
+
/******/ (() => {
|
|
1301
|
+
/******/ // define getter functions for harmony exports
|
|
1302
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
1303
|
+
/******/ for(var key in definition) {
|
|
1304
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1305
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1306
|
+
/******/ }
|
|
1307
|
+
/******/ }
|
|
1308
|
+
/******/ };
|
|
1309
|
+
/******/ })();
|
|
1301
1310
|
/******/
|
|
1311
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1312
|
+
/******/ (() => {
|
|
1313
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1314
|
+
/******/ })();
|
|
1315
|
+
/******/
|
|
1316
|
+
/************************************************************************/
|
|
1317
|
+
var __webpack_exports__ = {};
|
|
1318
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
1319
|
+
(() => {
|
|
1320
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1321
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1322
|
+
/* harmony export */ });
|
|
1323
|
+
/* harmony import */ var _passfather__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(344);
|
|
1324
|
+
/* harmony import */ var _passfather__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_passfather__WEBPACK_IMPORTED_MODULE_0__);
|
|
1325
|
+
|
|
1326
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_passfather__WEBPACK_IMPORTED_MODULE_0__.passfather);
|
|
1327
|
+
})();
|
|
1328
|
+
|
|
1329
|
+
var __webpack_exports__default = __webpack_exports__.Z;
|
|
1330
|
+
export { __webpack_exports__default as default };
|
|
@@ -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.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);
|
|
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},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},_=function(){return 2.3283064365386963e-10*f()};return _.uint32=f,_.fract53=function(){return _()+11102230246251565e-32*(2097151&f())},_.version="MRG32k3a 0.9",_.args=e,_}(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}},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),_=i.random,d=i.randomItem,h=i.shuffle,m=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function g({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=h(g(r));return h(e,r.prng,n)},i=e=>{const n=h(g(r));return _(e,r.prng,h(n))},l=e=>{const n=h(g(r));return d(e,r.prng,h(n))},f=function(e){return t([].concat(e.numbers&&[m[0]],e.uppercase&&[m[1]],e.lowercase&&[m[2]],e.symbols&&[m[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:m,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:_}=r(599),d=r(664),{name:h}=r(876),m=h,g={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)&&!_(e))),completely(e){return[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(g),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({},g,e);return p(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},g,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()))}},b=[];b[0]="No errors",b[1]=`[${m}]: Option must be an object`,b[2]=`[${m}]: Options must contains only one (or several) of [${t(g).join(", ")}]`,b[3]=`[${m}]: 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]=`[${m}]: Option "numbers" must be boolean`,b[5]=`[${m}]: Option "uppercase" must be boolean`,b[6]=`[${m}]: Option "lowercase" must be boolean`,b[7]=`[${m}]: Option "symbols" must be boolean`,b[8]=`[${m}]: Option "length" must be integer greater than 0`,b[9]=`[${m}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${m}]: Option "seed" must be array of strings or numbers`,b[11]=`[${m}]: At less one of options [${p(t(g),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${m}]: 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:m,DEFAULT_OPTIONS:g}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.2-beta.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"},"dependencies":{"serve":"^13.0.2"}}')}},__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}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var __webpack_exports__={};(()=>{__webpack_require__.d(__webpack_exports__,{Z:()=>e});const e=__webpack_require__(344).passfather})();var __webpack_exports__default=__webpack_exports__.Z;export{__webpack_exports__default as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.esm.min.js
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.1
|
|
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.1
|
|
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.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"},"dependencies":{"serve":"^13.0.2"}}');
|
|
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.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__})()}));
|
|
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.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"},"dependencies":{"serve":"^13.0.2"}}')}},__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.1
|
|
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.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);
|
|
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},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},_=function(){return 2.3283064365386963e-10*f()};return _.uint32=f,_.fract53=function(){return _()+11102230246251565e-32*(2097151&f())},_.version="MRG32k3a 0.9",_.args=e,_}(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}},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),_=i.random,d=i.randomItem,h=i.shuffle,m=[[[48,57]],[[65,90]],[[97,122]],[[33,46],[58,64],[94,96],[123,126]]];function g({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=h(g(r));return h(e,r.prng,n)},i=e=>{const n=h(g(r));return _(e,r.prng,h(n))},l=e=>{const n=h(g(r));return d(e,r.prng,h(n))},f=function(e){return t([].concat(e.numbers&&[m[0]],e.uppercase&&[m[1]],e.lowercase&&[m[2]],e.symbols&&[m[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:m,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:_}=r(599),d=r(664),{name:h}=r(876),m=h,g={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)&&!_(e))),completely(e){return[()=>!1===(void 0===e||u(e)&&0===t(e).length),()=>u(e),()=>s(t(g),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({},g,e);return p(t(n),["length"]).some((e=>"ranges"===e?i(n[e]):!0===n[e]))},()=>{const n=c({},g,e);return!1===(e.hasOwnProperty("seed")&&"default"===n.prng)}].findIndex((e=>!1===e()))}},b=[];b[0]="No errors",b[1]=`[${m}]: Option must be an object`,b[2]=`[${m}]: Options must contains only one (or several) of [${t(g).join(", ")}]`,b[3]=`[${m}]: 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]=`[${m}]: Option "numbers" must be boolean`,b[5]=`[${m}]: Option "uppercase" must be boolean`,b[6]=`[${m}]: Option "lowercase" must be boolean`,b[7]=`[${m}]: Option "symbols" must be boolean`,b[8]=`[${m}]: Option "length" must be integer greater than 0`,b[9]=`[${m}]: Option "prng" must be one of [${["default"].concat(t(d)).join(", ")}]`,b[10]=`[${m}]: Option "seed" must be array of strings or numbers`,b[11]=`[${m}]: At less one of options [${p(t(g),["length","prng","seed"]).join(", ")}] mustn't be false`,b[12]=`[${m}]: 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:m,DEFAULT_OPTIONS:g}},876:e=>{e.exports=JSON.parse('{"name":"passfather","version":"3.0.2-beta.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"},"dependencies":{"serve":"^13.0.2"}}')}},__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}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var __webpack_exports__={};(()=>{__webpack_require__.d(__webpack_exports__,{Z:()=>e});const e=__webpack_require__(344).passfather})();var __webpack_exports__default=__webpack_exports__.Z;export{__webpack_exports__default as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @file passfather.min.mjs
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2-beta.1
|
|
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.1
|
|
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
|
|
@@ -658,17 +658,6 @@ module.exports = {
|
|
|
658
658
|
|
|
659
659
|
/***/ }),
|
|
660
660
|
|
|
661
|
-
/***/ 670:
|
|
662
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
663
|
-
|
|
664
|
-
const {
|
|
665
|
-
passfather
|
|
666
|
-
} = __webpack_require__(344);
|
|
667
|
-
|
|
668
|
-
module.exports = passfather;
|
|
669
|
-
|
|
670
|
-
/***/ }),
|
|
671
|
-
|
|
672
661
|
/***/ 344:
|
|
673
662
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
674
663
|
|
|
@@ -790,7 +779,8 @@ module.exports = {
|
|
|
790
779
|
|
|
791
780
|
const {
|
|
792
781
|
compact,
|
|
793
|
-
hasWindow
|
|
782
|
+
hasWindow,
|
|
783
|
+
hasProcess
|
|
794
784
|
} = __webpack_require__(599);
|
|
795
785
|
|
|
796
786
|
const os = hasWindow() ? {} : eval(`require('os')`);
|
|
@@ -799,7 +789,7 @@ const os = hasWindow() ? {} : eval(`require('os')`);
|
|
|
799
789
|
* @const
|
|
800
790
|
*/
|
|
801
791
|
|
|
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;
|
|
792
|
+
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
793
|
/**
|
|
804
794
|
* Default seed for prng
|
|
805
795
|
* @const
|
|
@@ -827,6 +817,15 @@ const PRNGKeys = new Set(Object.keys(PRNGs));
|
|
|
827
817
|
function hasWindow() {
|
|
828
818
|
return typeof window !== 'undefined' && window.hasOwnProperty('Window') && window instanceof window.Window;
|
|
829
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* Returns true if the global environment has process
|
|
822
|
+
* @return {Boolaen}
|
|
823
|
+
*/
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
function hasProcess() {
|
|
827
|
+
return typeof process !== 'undefined';
|
|
828
|
+
}
|
|
830
829
|
/**
|
|
831
830
|
* Returns crypto module for this environment
|
|
832
831
|
*/
|
|
@@ -1111,6 +1110,7 @@ function pick(arr, values) {
|
|
|
1111
1110
|
|
|
1112
1111
|
module.exports = {
|
|
1113
1112
|
hasWindow,
|
|
1113
|
+
hasProcess,
|
|
1114
1114
|
getRandomUint32,
|
|
1115
1115
|
random,
|
|
1116
1116
|
randomItem,
|
|
@@ -1188,7 +1188,6 @@ const DEFAULT_OPTIONS = {
|
|
|
1188
1188
|
*/
|
|
1189
1189
|
|
|
1190
1190
|
const OPTION_VALIDATORS = {
|
|
1191
|
-
_memo: {},
|
|
1192
1191
|
numbers: value => isBoolean(value),
|
|
1193
1192
|
uppercase: value => isBoolean(value),
|
|
1194
1193
|
lowercase: value => isBoolean(value),
|
|
@@ -1208,12 +1207,6 @@ const OPTION_VALIDATORS = {
|
|
|
1208
1207
|
* @return {Number} Error code or 0 if validation passed
|
|
1209
1208
|
*/
|
|
1210
1209
|
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
1210
|
const cases = [// [IMPORTANT] Order is important, because index of case matches with error code
|
|
1218
1211
|
() => (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
1212
|
const opts = assign({}, DEFAULT_OPTIONS, options);
|
|
@@ -1225,8 +1218,6 @@ const OPTION_VALIDATORS = {
|
|
|
1225
1218
|
return (options.hasOwnProperty('seed') && opts.prng === 'default') === false;
|
|
1226
1219
|
}];
|
|
1227
1220
|
const result = cases.findIndex(item => item() === false);
|
|
1228
|
-
this._memo[optionsKey] = result; // Memoize result value
|
|
1229
|
-
|
|
1230
1221
|
return result;
|
|
1231
1222
|
}
|
|
1232
1223
|
|
|
@@ -1262,7 +1253,7 @@ module.exports = {
|
|
|
1262
1253
|
/***/ 876:
|
|
1263
1254
|
/***/ ((module) => {
|
|
1264
1255
|
|
|
1265
|
-
module.exports = JSON.parse('{"name":"passfather","version":"3.0.
|
|
1256
|
+
module.exports = JSON.parse('{"name":"passfather","version":"3.0.2-beta.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"},"dependencies":{"serve":"^13.0.2"}}');
|
|
1266
1257
|
|
|
1267
1258
|
/***/ })
|
|
1268
1259
|
|
|
@@ -1293,9 +1284,47 @@ module.exports = JSON.parse('{"name":"passfather","version":"3.0.0","description
|
|
|
1293
1284
|
/******/ }
|
|
1294
1285
|
/******/
|
|
1295
1286
|
/************************************************************************/
|
|
1287
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
1288
|
+
/******/ (() => {
|
|
1289
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1290
|
+
/******/ __webpack_require__.n = (module) => {
|
|
1291
|
+
/******/ var getter = module && module.__esModule ?
|
|
1292
|
+
/******/ () => (module['default']) :
|
|
1293
|
+
/******/ () => (module);
|
|
1294
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
1295
|
+
/******/ return getter;
|
|
1296
|
+
/******/ };
|
|
1297
|
+
/******/ })();
|
|
1296
1298
|
/******/
|
|
1297
|
-
/******/
|
|
1298
|
-
/******/
|
|
1299
|
-
/******/
|
|
1300
|
-
/******/
|
|
1299
|
+
/******/ /* webpack/runtime/define property getters */
|
|
1300
|
+
/******/ (() => {
|
|
1301
|
+
/******/ // define getter functions for harmony exports
|
|
1302
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
1303
|
+
/******/ for(var key in definition) {
|
|
1304
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1305
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1306
|
+
/******/ }
|
|
1307
|
+
/******/ }
|
|
1308
|
+
/******/ };
|
|
1309
|
+
/******/ })();
|
|
1301
1310
|
/******/
|
|
1311
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1312
|
+
/******/ (() => {
|
|
1313
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1314
|
+
/******/ })();
|
|
1315
|
+
/******/
|
|
1316
|
+
/************************************************************************/
|
|
1317
|
+
var __webpack_exports__ = {};
|
|
1318
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
1319
|
+
(() => {
|
|
1320
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1321
|
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1322
|
+
/* harmony export */ });
|
|
1323
|
+
/* harmony import */ var _passfather__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(344);
|
|
1324
|
+
/* harmony import */ var _passfather__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_passfather__WEBPACK_IMPORTED_MODULE_0__);
|
|
1325
|
+
|
|
1326
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_passfather__WEBPACK_IMPORTED_MODULE_0__.passfather);
|
|
1327
|
+
})();
|
|
1328
|
+
|
|
1329
|
+
var __webpack_exports__default = __webpack_exports__.Z;
|
|
1330
|
+
export { __webpack_exports__default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passfather",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2-beta.2",
|
|
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": [
|
|
@@ -38,5 +38,7 @@
|
|
|
38
38
|
"directories": {
|
|
39
39
|
"doc": "./README.md"
|
|
40
40
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"serve": "^13.0.2"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
## 3.0.0 (August 23, 2021)
|
|
2
|
-
* Improve PRNG algorithm
|
|
3
|
-
* Make new test for each of PRNG algorithm
|
|
4
|
-
* Memoize option validation result, up performance
|
|
5
|
-
|
|
6
|
-
## 2.1.3 (October 04, 2020)
|
|
7
|
-
* Add missing typescript declaration in dist directory
|
|
8
|
-
|
|
9
|
-
## 2.1.2 (October 04, 2020)
|
|
10
|
-
* Add .esm.js bundle to module of package.json (instead .mjs) for more compatibility
|
|
11
|
-
|
|
12
|
-
## 2.1.1 (September 21, 2020)
|
|
13
|
-
|
|
14
|
-
* Add semver to unpkg links
|
|
15
|
-
* Add module property to package.json
|
|
16
|
-
|
|
17
|
-
## 2.1.0 (September 21, 2020)
|
|
18
|
-
|
|
19
|
-
* Improve build
|
|
20
|
-
* Add ESM support
|
|
21
|
-
* Code refactoring
|
|
22
|
-
* Other improvements
|
|
23
|
-
|
|
24
|
-
## 2.0.0 (December 25, 2019)
|
|
25
|
-
|
|
26
|
-
* Add multiple pseudorandom number generators
|
|
27
|
-
* Code refactoring
|
|
28
|
-
|
|
29
|
-
## 1.4.1 (November 17, 2019)
|
|
30
|
-
|
|
31
|
-
* Possibility to generate password with custom char ranges
|
|
32
|
-
|
|
33
|
-
## 1.3.1 (September 17, 2019)
|
|
34
|
-
|
|
35
|
-
* Improved TS declaration file
|
|
36
|
-
* Add TS declaration path to `package.json`
|
|
37
|
-
* Add `CHANGELOG.md`
|