"use strict";exports.id=691,exports.ids=[691],exports.modules={8691:(r,t,n)=>{n.d(t,{ZP:()=>$});var e=n(4770),o=null;function i(r,t){if("number"!=typeof(r=r||v))throw Error("Illegal arguments: "+typeof r+", "+typeof t);r<4?r=4:r>31&&(r=31);var n=[];return n.push("$2b$"),r<10&&n.push("0"),n.push(r.toString()),n.push("$"),n.push(g(function(r){try{return crypto.getRandomValues(new Uint8Array(r))}catch{}try{return e.randomBytes(r)}catch{}if(!o)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return o(r)}(d),d)),n.join("")}function f(r,t,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=void 0),void 0===r)r=v;else if("number"!=typeof r)throw Error("illegal arguments: "+typeof r);function e(t){a(function(){try{t(null,i(r))}catch(r){t(r)}})}if(!n)return new Promise(function(r,t){e(function(n,e){if(n){t(n);return}r(e)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);e(n)}function u(r,t){if(void 0===t&&(t=v),"number"==typeof t&&(t=i(t)),"string"!=typeof r||"string"!=typeof t)throw Error("Illegal arguments: "+typeof r+", "+typeof t);return k(r,t)}function l(r,t,n,e){function o(n){"string"==typeof r&&"number"==typeof t?f(t,function(t,o){k(r,o,n,e)}):"string"==typeof r&&"string"==typeof t?k(r,t,n,e):a(n.bind(this,Error("Illegal arguments: "+typeof r+", "+typeof t)))}if(!n)return new Promise(function(r,t){o(function(n,e){if(n){t(n);return}r(e)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)}function s(r,t){for(var n=r.length^t.length,e=0;er.length)throw Error("Illegal len: "+t);for(;o>2&63]),n=(3&n)<<4,o>=t||(n|=(e=255&r[o++])>>4&15,i.push(c[63&n]),n=(15&e)<<2,o>=t)){i.push(c[63&n]);break}n|=(e=255&r[o++])>>6&3,i.push(c[63&n]),i.push(c[63&e])}return i.join("")}function y(r,t){var n,e,o,i,f,u=0,l=r.length,s=0,a=[];if(t<=0)throw Error("Illegal len: "+t);for(;u>>0|(48&e)>>4,a.push(String.fromCharCode(i)),!(++s>=t||u>=l||-1==(o=(f=r.charCodeAt(u++))>>0|(60&o)>>2,a.push(String.fromCharCode(i)),++s>=t||u>=l)));)i=(3&o)<<6>>>0|((f=r.charCodeAt(u++))>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[1],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[2],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[3],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[4],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[5],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[6],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[7],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[8],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[9],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[10],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[11],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[12],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[13],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[14],i^=(e[o>>>24]+e[256|o>>16&255]^e[512|o>>8&255])+e[768|255&o]^n[15],o^=(e[i>>>24]+e[256|i>>16&255]^e[512|i>>8&255])+e[768|255&i]^n[16],r[t]=i^n[17],r[t+1]=o,r}function A(r,t){for(var n=0,e=0;n<4;++n)e=e<<8|255&r[t],t=(t+1)%r.length;return{key:e,offp:t}}function E(r,t,n){for(var e,o=0,i=[0,0],f=t.length,u=n.length,l=0;l31){if(f=Error("Illegal number of rounds (4-31): "+n),e){a(e.bind(this,f));return}throw f}if(t.length!==d){if(f=Error("Illegal salt length: "+t.length+" != "+d),e){a(e.bind(this,f));return}throw f}n=1<>>0;var s,h,c,p=0;function g(){if(o&&o(p/n),p100)););else{for(p=0;p<64;p++)for(c=0;c>1;c++)I(u,c<<1,s,h);var f=[];for(p=0;p>24&255)>>>0),f.push((u[p]>>16&255)>>>0),f.push((u[p]>>8&255)>>>0),f.push((255&u[p])>>>0);return e?void e(null,f):f}e&&a(g)}if("function"==typeof Int32Array?(s=new Int32Array(b),h=new Int32Array(m)):(s=b.slice(),h=m.slice()),function(r,t,n,e){for(var o,i=0,f=[0,0],u=n.length,l=e.length,s=0;s"$"){if(o=Error("Missing salt rounds"),n){a(n.bind(this,o));return}throw o}var o,i,f,u=10*parseInt(t.substring(f,f+1),10)+parseInt(t.substring(f+1,f+2),10),l=t.substring(f+3,f+25),s=function(r){for(var t,n,e=0,o=Array(h(r)),i=0,f=r.length;i>6|192:((64512&t)==55296&&(64512&(n=r.charCodeAt(i+1)))==56320?(t=65536+((1023&t)<<10)+(1023&n),++i,o[e++]=t>>18|240,o[e++]=t>>12&63|128):o[e++]=t>>12|224,o[e++]=t>>6&63|128),o[e++]=63&t|128);return o}(r+=i>="a"?"\0":""),c=y(l,d);function p(r){var t=[];return t.push("$2"),i>="a"&&t.push(i),t.push("$"),u<10&&t.push("0"),t.push(u.toString()),t.push("$"),t.push(g(c,c.length)),t.push(g(r,4*w.length-1)),t.join("")}if(void 0===n)return p(C(s,c,u));C(s,c,u,function(r,t){r?n(r,null):n(null,p(t))},e)}let $={setRandomFallback:function(r){o=r},genSaltSync:i,genSalt:f,hashSync:u,hash:l,compareSync:function(r,t){if("string"!=typeof r||"string"!=typeof t)throw Error("Illegal arguments: "+typeof r+", "+typeof t);return 60===t.length&&s(u(r,t.substring(0,t.length-31)),t)},compare:function(r,t,n,e){function o(n){if("string"!=typeof r||"string"!=typeof t){a(n.bind(this,Error("Illegal arguments: "+typeof r+", "+typeof t)));return}if(60!==t.length){a(n.bind(this,null,!1));return}l(r,t.substring(0,29),function(r,e){r?n(r):n(null,s(e,t))},e)}if(!n)return new Promise(function(r,t){o(function(n,e){if(n){t(n);return}r(e)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);o(n)},getRounds:function(r){if("string"!=typeof r)throw Error("Illegal arguments: "+typeof r);return parseInt(r.split("$")[2],10)},getSalt:function(r){if("string"!=typeof r)throw Error("Illegal arguments: "+typeof r);if(60!==r.length)throw Error("Illegal hash length: "+r.length+" != 60");return r.substring(0,29)},truncates:function(r){if("string"!=typeof r)throw Error("Illegal arguments: "+typeof r);return h(r)>72},encodeBase64:function(r,t){return g(r,t)},decodeBase64:function(r,t){return y(r,t)}}}};