forked from Mirrors/doipjs
21 lines
160 KiB
JavaScript
21 lines
160 KiB
JavaScript
|
var doip=function(e,A,t){"use strict";function r(e){var A=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(A,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),A.default=e,Object.freeze(A)}var i=r(A),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var A=e.default;if("function"==typeof A){var t=function e(){if(this instanceof e){var t=[null];return t.push.apply(t,arguments),new(Function.bind.apply(A,t))}return A.apply(this,arguments)};t.prototype=A.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach((function(A){var r=Object.getOwnPropertyDescriptor(e,A);Object.defineProperty(t,A,r.get?r:{enumerable:!0,get:function(){return e[A]}})})),t}var s={},c={exports:{}};!function(e,A){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}Object.defineProperty(A,"__esModule",{value:!0}),A.default=function(e){var A="string"==typeof e||e instanceof String;if(!A){var r=t(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=A.default,e.exports.default=A.default}(c,c.exports);var I=c.exports,g={};Object.defineProperty(g,"__esModule",{value:!0}),g.commaDecimal=g.dotDecimal=g.bengaliLocales=g.farsiLocales=g.arabicLocales=g.englishLocales=g.decimal=g.alphanumeric=g.alpha=void 0;var h={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/};g.alpha=h;var l={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜ
|
|||
|
/*!
|
|||
|
* hash-wasm (https://www.npmjs.com/package/hash-wasm)
|
|||
|
* (c) Dani Biro
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
/*! *****************************************************************************
|
|||
|
Copyright (c) Microsoft Corporation.
|
|||
|
|
|||
|
Permission to use, copy, modify, and/or distribute this software for any
|
|||
|
purpose with or without fee is hereby granted.
|
|||
|
|
|||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|||
|
PERFORMANCE OF THIS SOFTWARE.
|
|||
|
***************************************************************************** */function $e(e,A,t,r){return new(t||(t=Promise))((function(i,o){function n(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var A;e.done?i(e.value):(A=e.value,A instanceof t?A:new t((function(e){e(A)}))).then(n,a)}s((r=r.apply(e,A||[])).next())}))}class eA{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then((()=>new Promise(e))),new Promise((A=>{e=A}))}dispatch(e){return $e(this,void 0,void 0,(function*(){const A=yield this.lock();try{return yield Promise.resolve(e())}finally{A()}}))}}const AA="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:z,tA=null!==(ze=AA.Buffer)&&void 0!==ze?ze:null,rA=AA.TextEncoder?new AA.TextEncoder:null;function iA(e,A){return(15&e)+(e>>6|e>>3&8)<<4|(15&A)+(A>>6|A>>3&8)}function oA(e,A){const t=A.length>>1;for(let r=0;r<t;r++){const t=r<<1;e[r]=iA(A.charCodeAt(t),A.charCodeAt(t+1))}}const nA="a".charCodeAt(0)-10,aA="0".charCodeAt(0);function sA(e,A,t){let r=0;for(let i=0;i<t;i++){let t=A[i]>>>4;e[r++]=t>9?t+nA:t+aA,t=15&A[i],e[r++]=t>9?t+nA:t+aA}return String.fromCharCode.apply(null,e)}const cA=null!==tA?e=>{if("string"==typeof e){const A=tA.from(e,"utf8");return new Uint8Array(A.buffer,A.byteOffset,A.length)}if(tA.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return rA.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},IA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gA=new Uint8Array(256);for(let e=0;e<IA.length;e++)gA[IA.charCodeAt(e)]=e;function hA(e,A=!0){const t=e.length,r=t%3,i=[],o=t-r;for(let A=0;A<o;A+=3){const t=(e[A]<<16&16711680)+(e[A+1]<<8&65280)+(255&e[A+2]),r=IA.charAt(t>>18&63)+IA.charAt(t>>12&63)+IA.charAt(t>>6&63)+IA.charAt(63&t);i.push(r)}if(1===r){const r=e[t-1],o=IA.charAt(r>>2),n=IA.charAt(r<<4&63);i.push(`${o}${n}`),A&&i.push("==")}else if(2===r){const r=(e[t-2]<<8)+e[t-1],o=IA.charAt(r>>10),n=IA.charAt(r>>4&63),a=IA.charAt(r<<2&63);i.push(`${o}${n}${a}`),A&&i.push("=")}return i.join("")}function lA(e){let A=Math.floor(.75*e.length);const t=e.length;return"="===e[t-1]&&(A-=1,"="===e[t-2]&&(A-=1)),A}function uA(e){const A=lA(e),t=e.length,r=new Uint8Array(A);let i=0;for(let A=0;A<t;A+=4){const t=gA[e.charCodeAt(A)],o=gA[e.charCodeAt(A+1)],n=gA[e.charCodeAt(A+2)],a=gA[e.charCodeAt(A+3)];r[i]=t<<2|o>>4,i+=1,r[i]=(15&o)<<4|n>>2,i+=1,r[i]=(3&n)<<6|63&a,i+=1}return r}const BA=16384,fA=4,CA=new eA,pA=new Map;function dA(e,A){return $e(this,void 0,void 0,(function*(){let t=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const o=()=>new DataView(t.exports.memory.buffer).getUint32(t.exports.STATE_SIZE,!0),n=CA.dispatch((()=>$e(this,void 0,void 0,(function*(){if(!pA.has(e.name)){const A=uA(e.data),t=WebAssembly.compile(A);pA.set(e.name,t)}const A=yield pA.get(e.name);t=yield WebAssembly.instantiate(A,{})})))),a=(e=null)=>{i=!0,t.exports.Hash_Init(e)},s=e=>{if(!i)throw new Error("update() called before init()");(e=>{let A=0;for(;A<e.length;){const i=e.subarray(A,A+BA);A+=i.length,r.set(i),t.exports.Hash_Update(i.length)}})(cA(e))},c=new Uint8Array(2*A),I=(e,o=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,t.exports.Hash_Final(o),"binary"===e?r.slice(0,A):sA(c,r,A)},g=e=>"string"==typeof e?e.length<BA/4:e.byteLength<BA;let h=g;switch(e.name){case"argon2":case"scrypt":h=()=>!0;break;case"blake2b":case"blake2s":h=(e,A)=>A<=512&&g(e);break;case"blake3":h=(e,A)=>0===A&&g(e);break;case"xxhash64":case"xxhash3":case"xxhash128":h=()=>!1}return yield(()=>$e(this,void 0,void 0,(function*(){t||(yield n);const e=t.exports.Hash_GetBuffer(),A=t.exports.memory.buffer;r=new Uint8Array(A,e,BA)})))(),{getMemory:
|