33 lines
274 KiB
JavaScript
33 lines
274 KiB
JavaScript
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=23)}([function(t,e,r){var n;t.exports=(n=n||function(t,e){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto),!n)try{n=r(2)}catch(t){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),a={},s=a.lib={},u=s.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)e[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new c.init(e,t)}}),f=a.enc={},l=f.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(r,e/2)}},h=f.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(r,e)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},d=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,f=t.min(4*u,o);if(u){for(var l=0;l<u;l+=a)this._doProcessBlock(i,l);r=i.splice(0,u),n.sigBytes-=f}return new c.init(r,f)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(s.Hasher=d.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new y.HMAC.init(t,r).finalize(e)}}}),a.algo={});return a}(Math),n)},function(t,e,r){var n,i,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w;t.exports=(n=r(0),r(4),void(n.lib.Cipher||(i=n,o=i.lib,a=o.Base,s=o.WordArray,u=o.BufferedBlockAlgorithm,c=i.enc,c.Utf8,f=c.Base64,l=i.algo.EvpKDF,h=o.Cipher=u.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?w:m}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),p=i.mode={},d=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),y=p.CBC=function(){var t=d.extend();function e(t,e,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var o=0;o<r;o++)t[e+o]^=n[o]}return t.Encryptor=t.extend({processBlock:function(t,r){var n=this._cipher,i=n.blockSize;e.call(this,t,r,i),n.encryptBlock(t,r),this._prevBlock=t.slice(r,r+i)}}),t.Decryptor=t.extend({processBlock:function(t,r){var n=this._cipher,i=n.blockSize,o=t.slice(r,r+i);n.decryptBlock(t,r),e.call(this,t,r,i),this._prevBlock=o}}),t}(),g=(i.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,i=n<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(i);var u=s.create(o,n);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:y,padding:g}),reset:function(){var t;h.reset.call(this);var e=this.cfg,r=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(n,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),v=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),_=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(e):e).toString(f)},parse:function(t){var e,r=f.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},m=o.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),o=i.finalize(e),a=i.cfg;return v.create({ciphertext:o,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),b=(i.kdf={}).OpenSSL={execute:function(t,e,r,n){n||(n=s.random(8));var i=l.create({keySize:e+r}).compute(t,n),o=s.create(i.words.slice(e),4*r);return i.sigBytes=4*e,v.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(t,e,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize);n.iv=i.iv;var o=m.encrypt.call(this,t,e,i.key,n);return o.mixIn(i),o},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt);return n.iv=i.iv,m.decrypt.call(this,t,e,i.key,n)}}))))},function(t,e){t.exports=require("crypto")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={FormData:!0,UniCloudError:!0};Object.defineProperty(e,"FormData",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"UniCloudError",{enumerable:!0,get:function(){return o.default}});var i=u(r(26)),o=u(r(27)),a=r(28);Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=r(7);function u(t){return t&&t.__esModule?t:{default:t}}Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}))},function(t,e,r){var n,i,o,a,s,u,c,f;t.exports=(f=r(0),r(11),r(12),i=(n=f).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.length<u;){r&&i.update(r),r=i.update(t).finalize(e),i.reset();for(var f=1;f<c;f++)r=i.finalize(r),i.reset();o.concat(r)}return o.sigBytes=4*u,o}}),n.EvpKDF=function(t,e,r){return c.create(r).compute(t,e)},f.EvpKDF)},function(t,e,r){var n,i,o;t.exports=(o=r(0),i=(n=o).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return function(t,e,r){for(var n=[],o=0,a=0;a<e;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2,u=r[t.charCodeAt(a)]>>>6-a%4*2,c=s|u;n[o>>>2]|=c<<24-o%4*8,o++}return i.create(n,o)}(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},function(t,e,r){var n;t.exports=(n=r(0),function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,i=t[n];t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],u=t[e+1],p=t[e+2],d=t[e+3],y=t[e+4],g=t[e+5],v=t[e+6],_=t[e+7],m=t[e+8],b=t[e+9],w=t[e+10],S=t[e+11],E=t[e+12],A=t[e+13],I=t[e+14],N=t[e+15],C=o[0],R=o[1],T=o[2],x=o[3];C=c(C,R,T,x,a,7,s[0]),x=c(x,C,R,T,u,12,s[1]),T=c(T,x,C,R,p,17,s[2]),R=c(R,T,x,C,d,22,s[3]),C=c(C,R,T,x,y,7,s[4]),x=c(x,C,R,T,g,12,s[5]),T=c(T,x,C,R,v,17,s[6]),R=c(R,T,x,C,_,22,s[7]),C=c(C,R,T,x,m,7,s[8]),x=c(x,C,R,T,b,12,s[9]),T=c(T,x,C,R,w,17,s[10]),R=c(R,T,x,C,S,22,s[11]),C=c(C,R,T,x,E,7,s[12]),x=c(x,C,R,T,A,12,s[13]),T=c(T,x,C,R,I,17,s[14]),C=f(C,R=c(R,T,x,C,N,22,s[15]),T,x,u,5,s[16]),x=f(x,C,R,T,v,9,s[17]),T=f(T,x,C,R,S,14,s[18]),R=f(R,T,x,C,a,20,s[19]),C=f(C,R,T,x,g,5,s[20]),x=f(x,C,R,T,w,9,s[21]),T=f(T,x,C,R,N,14,s[22]),R=f(R,T,x,C,y,20,s[23]),C=f(C,R,T,x,b,5,s[24]),x=f(x,C,R,T,I,9,s[25]),T=f(T,x,C,R,d,14,s[26]),R=f(R,T,x,C,m,20,s[27]),C=f(C,R,T,x,A,5,s[28]),x=f(x,C,R,T,p,9,s[29]),T=f(T,x,C,R,_,14,s[30]),C=l(C,R=f(R,T,x,C,E,20,s[31]),T,x,g,4,s[32]),x=l(x,C,R,T,m,11,s[33]),T=l(T,x,C,R,S,16,s[34]),R=l(R,T,x,C,I,23,s[35]),C=l(C,R,T,x,u,4,s[36]),x=l(x,C,R,T,y,11,s[37]),T=l(T,x,C,R,_,16,s[38]),R=l(R,T,x,C,w,23,s[39]),C=l(C,R,T,x,A,4,s[40]),x=l(x,C,R,T,a,11,s[41]),T=l(T,x,C,R,d,16,s[42]),R=l(R,T,x,C,v,23,s[43]),C=l(C,R,T,x,b,4,s[44]),x=l(x,C,R,T,E,11,s[45]),T=l(T,x,C,R,N,16,s[46]),C=h(C,R=l(R,T,x,C,p,23,s[47]),T,x,a,6,s[48]),x=h(x,C,R,T,_,10,s[49]),T=h(T,x,C,R,I,15,s[50]),R=h(R,T,x,C,g,21,s[51]),C=h(C,R,T,x,E,6,s[52]),x=h(x,C,R,T,d,10,s[53]),T=h(T,x,C,R,w,15,s[54]),R=h(R,T,x,C,u,21,s[55]),C=h(C,R,T,x,m,6,s[56]),x=h(x,C,R,T,N,10,s[57]),T=h(T,x,C,R,v,15,s[58]),R=h(R,T,x,C,A,21,s[59]),C=h(C,R,T,x,y,6,s[60]),x=h(x,C,R,T,S,10,s[61]),T=h(T,x,C,R,p,15,s[62]),R=h(R,T,x,C,b,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+R|0,o[2]=o[2]+T|0,o[3]=o[3]+x|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var f=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,n,i,o,a){var s=t+(e&r|~e&n)+i+a;return(s<<o|s>>>32-o)+e}function f(t,e,r,n,i,o,a){var s=t+(e&n|r&~n)+i+a;return(s<<o|s>>>32-o)+e}function l(t,e,r,n,i,o,a){var s=t+(e^r^n)+i+a;return(s<<o|s>>>32-o)+e}function h(t,e,r,n,i,o,a){var s=t+(r^(e|~n))+i+a;return(s<<o|s>>>32-o)+e}e.MD5=o._createHelper(u),e.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.accMul=function(t,e){if(isNaN(t)||isNaN(e))return NaN;const{value:r,power:n}=y(t),{value:i,power:o}=y(e);return r*i/Math.pow(10,n+o)},e.camel2snake=l,e.camel2snakeJson=function(t){return h(t,"camel2snake")},e.deepClone=function(t){return JSON.parse(JSON.stringify(t))},e.deleteObjectKey=function t(e,r){const n=e.shift();if(!n)return;t(e,r[n]),r[n]&&(Object.keys(r[n]).length<=0||"string"==typeof r[n])&&delete r[n]},e.getDateStr=p,e.getExtension=function(t){return s[t]},e.getFullTimeStr=function(t){return p(t=t||new Date)+" "+d(t)},e.getOffsetDate=function(t){return new Date(Date.now()+6e4*((new Date).getTimezoneOffset()+60*(t||0)))},e.getTimeStr=d,e.hasOwn=o,e.isFn=function(t){return"function"==typeof t},e.isPlainObject=a,e.log=function(){0},e.mime2ext=void 0,e.snake2camel=f,e.snake2camelJson=function(t){return h(t,"snake2camel")};const n=Object.prototype.toString,i=Object.prototype.hasOwnProperty;function o(t,e){return i.call(t,e)}function a(t){return"[object Object]"===n.call(t)}const s={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/svg+xml":"svg","image/bmp":"bmp","image/webp":"webp"};e.mime2ext=s;const u=/_(\w)/g,c=/[A-Z]/g;function f(t){return t.replace(u,(t,e)=>e?e.toUpperCase():"")}function l(t){return t.replace(c,t=>"_"+t.toLowerCase())}function h(t,e){let r,n;switch(e){case"snake2camel":n=f,r=u;break;case"camel2snake":n=l,r=c}for(const i in t)if(o(t,i)&&r.test(i)){const r=n(i);t[r]=t[i],delete t[i],a(t[r])?t[r]=h(t[r],e):Array.isArray(t[r])&&(t[r]=t[r].map(t=>h(t,e)))}return t}function p(t,e="-"){t=t||new Date;const r=[];return r.push(t.getFullYear()),r.push(("00"+(t.getMonth()+1)).substr(-2)),r.push(("00"+t.getDate()).substr(-2)),r.join(e)}function d(t,e=":"){t=t||new Date;const r=[];return r.push(("00"+t.getHours()).substr(-2)),r.push(("00"+t.getMinutes()).substr(-2)),r.push(("00"+t.getSeconds()).substr(-2)),r.join(e)}function y(t){const e=t.toString().split("."),r=e[1]?e[1].length:0;return{value:Number(e.join("")),power:r}}},function(t,e,r){var n,i,o,a,s,u;t.exports=(u=r(0),i=(n=u).lib,o=i.Base,a=i.WordArray,(s=n.x64={}).Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],n=0;n<e;n++){var i=t[n];r.push(i.high),r.push(i.low)}return a.create(r,this.sigBytes)},clone:function(){for(var t=o.clone.call(this),e=t.words=this.words.slice(0),r=e.length,n=0;n<r;n++)e[n]=e[n].clone();return t}}),u)},function(t,e){t.exports=require("util")},function(t,e){t.exports=require("fs")},function(t,e,r){var n,i,o,a,s,u,c,f;t.exports=(f=r(0),i=(n=f).lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=0;c<80;c++){if(c<16)u[c]=0|t[e+c];else{var f=u[c-3]^u[c-8]^u[c-14]^u[c-16];u[c]=f<<1|f>>>31}var l=(n<<5|n>>>27)+s+u[c];l+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),f.SHA1)},function(t,e,r){var n,i,o,a;t.exports=(n=r(0),o=(i=n).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),o=this._iKey=e.clone(),s=i.words,u=o.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(76);e.bytesFromIP=function(t){switch(n.isIP(t)){case 4:return Buffer.from(t.split(".").map(t=>parseInt(t,10)));case 6:const e=t.split(":"),r=Buffer.alloc(16);let n=0;""===e[e.length-1]&&(e[e.length-1]="0");for(let t=0;t<e.length;t++)""!==e[t]?(r.writeUInt16BE(parseInt(e[t],16),n),n+=2):t+1<e.length&&""!==e[t+1]&&(n=16-2*(e.length-t-1));return r;default:return null}},e.bytesToIP=function(t){switch(t.length){case 4:return[t[0],t[1],t[2],t[3]].join(".");case 16:const e=[];let r=-1,n=0,i=-1,o=0;for(let a=0;a<t.length;a+=2){const s=t[a]<<8|t[a+1];0===s?(n++,-1===r&&(r=e.length),n>o&&(o=n,i=r)):(r=-1,n=0),e.push(s.toString(16))}if(o>0){let t="";const r=e.slice(i+o);e.length=i,0===e.length&&(t+=":"),0===r.length&&(t+=":"),e.push(t,...r)}return e.join(":");default:return""}};const i=Object.create(null),o=/^[0-9.]+$/;function a(t,e){i[t]=e,i[e]=t}e.getOID=function(t){return o.test(t)&&""!==i[t]?t:null==i[t]?"":i[t]},e.getOIDName=function(t){return o.test(t)||""===i[t]?null==i[t]?t:i[t]:t},a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRsaEncryption"),a("1.2.840.113549.1.1.5","sha1WithRsaEncryption"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRsaEncryption"),a("1.2.840.113549.1.1.12","sha384WithRsaEncryption"),a("1.2.840.113549.1.1.13","sha512WithRsaEncryption"),a("1.2.840.10045.2.1","ecEncryption"),a("1.2.840.10045.4.1","ecdsaWithSha1"),a("1.2.840.10045.4.3.2","ecdsaWithSha256"),a("1.2.840.10045.4.3.3","ecdsaWithSha384"),a("1.2.840.10045.4.3.4","ecdsaWithSha512"),a("1.2.840.10040.4.3","dsaWithSha1"),a("2.16.840.1.101.3.4.3.2","dsaWithSha256"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.3.101.110","X25519"),a("1.3.101.111","X448"),a("1.3.101.112","Ed25519"),a("1.3.101.113","Ed448"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.2.7","hmacWithSha1"),a("1.2.840.113549.2.9","hmacWithSha256"),a("1.2.840.113549.2.10","hmacWithSha384"),a("1.2.840.113549.2.11","hmacWithSha512"),a("1.2.840.113549.3.7","3desCBC"),a("2.16.840.1.101.3.4.1.2","aesCBC128"),a("2.16.840.1.101.3.4.1.42","aesCBC256"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.15","businessCategory"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.2","keyAttributes"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionST"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionC"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping"),a("1.3.6.1.5.5.7.48.1","authorityInfoAccessOcsp"),a("1.3.6.1.5.5.7.48.2","authorityInfoAccessIssuers")},function(t,e,r){"use strict";const n=t=>!("object"!=typeof t||null===t||t instanceof RegExp||t instanceof Error||t instanceof Date);t.exports=function t(e,r,i,o){if(i=Object.assign({deep:!1,target:{}},i),(o=o||new WeakMap).has(e))return o.get(e);o.set(e,i.target);const a=i.target;delete i.target;for(const s of Object.keys(e)){const u=e[s],c=r(s,u,e);let f=c[1];i.deep&&n(f)&&(f=Array.isArray(f)?f.map(e=>n(e)?t(e,r,i,o):e):t(f,r,i,o)),a[c[0]]=f}return a}},function(t,e,r){"use strict";var n=r(14),i=r(42);t.exports=function(t,e){return e=Object.assign({deep:!0},e),n(t,(function(t,e){return[i(t),e]}),e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(2),i=r(45),o=r(46),a=r(15),s=r(47),u=r(72),c={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};function f(t){return{iv:s.enc.Hex.parse(u.padEnd("",32,"0")),key:s.enc.Base64.parse(t)}}e.ALIPAY_ALGORITHM_MAPPING=c,e.aesDecrypt=function(t,e){const{iv:r,key:n}=f(e),i=s.AES.decrypt(t,n,{iv:r});return JSON.parse(i.toString(s.enc.Utf8))},e.sign=function(t,e={},r){let l=Object.assign({method:t,appId:r.appId,charset:r.charset,version:r.version,signType:r.signType,timestamp:i().format("YYYY-MM-DD HH:mm:ss")},u.omit(e,["bizContent","needEncrypt"]));r.appCertSn&&r.alipayRootCertSn&&(l=Object.assign({appCertSn:r.appCertSn,alipayRootCertSn:r.alipayRootCertSn},l)),r.wsServiceUrl&&(l.wsServiceUrl=r.wsServiceUrl);const h=e.bizContent;if(h)if(e.needEncrypt){if(!r.encryptKey)throw new Error("请设置encryptKey参数");l.encryptType="AES",l.bizContent=function(t,e){const{iv:r,key:n}=f(e);return s.AES.encrypt(JSON.stringify(t),n,{iv:r}).toString()}(a(h),r.encryptKey)}else l.bizContent=JSON.stringify(a(h));const p=a(l),d=Object.keys(p).sort().map(t=>{let e=p[t];return"[object String]"!==Array.prototype.toString.call(e)&&(e=JSON.stringify(e)),`${t}=${o.encode(e,r.charset)}`}).join("&"),y=n.createSign(c[r.signType]).update(d,"utf8").sign(r.privateKey,"base64");return Object.assign(p,{sign:y})}},function(t,e,r){var n;t.exports=(n=r(0),function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=[],u=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(s[i]=r(t.pow(n,.5))),u[i]=r(t.pow(n,1/3)),i++),n++}();var c=[],f=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var d=c[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=c[p-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=y+c[p-7]+v+c[p-16]}var _=n&i^n&o^i&o,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+u[p]+c[p];h=l,l=f,f=s,s=a+b|0,a=o,o=i,i=n,n=b+(m+_)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+f|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(f),e.HmacSHA256=o._createHmacHelper(f)}(Math),n.SHA256)},function(t,e,r){var n;t.exports=(n=r(0),r(8),function(){var t=n,e=t.lib.Hasher,r=t.x64,i=r.Word,o=r.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var t=0;t<80;t++)c[t]=s()}();var f=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=n.high,d=n.low,y=i.high,g=i.low,v=o.high,_=o.low,m=a.high,b=a.low,w=s.high,S=s.low,E=f.high,A=f.low,I=l.high,N=l.low,C=h.high,R=h.low,T=p,x=d,P=y,O=g,B=v,k=_,D=m,U=b,j=w,M=S,L=E,F=A,K=I,z=N,V=C,$=R,H=0;H<80;H++){var W,q,G=c[H];if(H<16)q=G.high=0|t[e+2*H],W=G.low=0|t[e+2*H+1];else{var J=c[H-15],Y=J.high,Z=J.low,X=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,Q=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),tt=c[H-2],et=tt.high,rt=tt.low,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,it=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=c[H-7],at=ot.high,st=ot.low,ut=c[H-16],ct=ut.high,ft=ut.low;q=(q=(q=X+at+((W=Q+st)>>>0<Q>>>0?1:0))+nt+((W+=it)>>>0<it>>>0?1:0))+ct+((W+=ft)>>>0<ft>>>0?1:0),G.high=q,G.low=W}var lt,ht=j&L^~j&K,pt=M&F^~M&z,dt=T&P^T&B^P&B,yt=x&O^x&k^O&k,gt=(T>>>28|x<<4)^(T<<30|x>>>2)^(T<<25|x>>>7),vt=(x>>>28|T<<4)^(x<<30|T>>>2)^(x<<25|T>>>7),_t=(j>>>14|M<<18)^(j>>>18|M<<14)^(j<<23|M>>>9),mt=(M>>>14|j<<18)^(M>>>18|j<<14)^(M<<23|j>>>9),bt=u[H],wt=bt.high,St=bt.low,Et=V+_t+((lt=$+mt)>>>0<$>>>0?1:0),At=vt+yt;V=K,$=z,K=L,z=F,L=j,F=M,j=D+(Et=(Et=(Et=Et+ht+((lt+=pt)>>>0<pt>>>0?1:0))+wt+((lt+=St)>>>0<St>>>0?1:0))+q+((lt+=W)>>>0<W>>>0?1:0))+((M=U+lt|0)>>>0<U>>>0?1:0)|0,D=B,U=k,B=P,k=O,P=T,O=x,T=Et+(gt+dt+(At>>>0<vt>>>0?1:0))+((x=lt+At|0)>>>0<lt>>>0?1:0)|0}d=n.low=d+x,n.high=p+T+(d>>>0<x>>>0?1:0),g=i.low=g+O,i.high=y+P+(g>>>0<O>>>0?1:0),_=o.low=_+k,o.high=v+B+(_>>>0<k>>>0?1:0),b=a.low=b+U,a.high=m+D+(b>>>0<U>>>0?1:0),S=s.low=S+M,s.high=w+j+(S>>>0<M>>>0?1:0),A=f.low=A+F,f.high=E+L+(A>>>0<F>>>0?1:0),N=l.low=N+z,l.high=I+K+(N>>>0<z>>>0?1:0),R=h.low=R+$,h.high=C+V+(R>>>0<$>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(n+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(f),t.HmacSHA512=e._createHmacHelper(f)}(),n.SHA512)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(13);e.bytesFromIP=n.bytesFromIP,e.bytesToIP=n.bytesToIP,e.getOID=n.getOID,e.getOIDName=n.getOIDName;var i=r(20);e.PublicKey=i.PublicKey,e.PrivateKey=i.PrivateKey,e.RSAPublicKey=i.RSAPublicKey,e.RSAPrivateKey=i.RSAPrivateKey;var o=r(80);e.Certificate=o.Certificate,e.DistinguishedName=o.DistinguishedName},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(9),i=r(2),o=r(77),a=r(21),s=r(13);e.publicKeyValidator={name:"PublicKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"publicKeyInfo",value:[{name:"PublicKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PublicKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"publicKeyOID"}]},{name:"PublicKeyInfo.PublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.BITSTRING,capture:"publicKey"}]},e.privateKeyValidator={name:"PrivateKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"privateKeyInfo",value:[{name:"PrivateKeyInfo.Version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PrivateKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"privateKeyOID"}]},{name:"PrivateKeyInfo.PrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.OCTETSTRING,capture:"privateKey"}]};const u={name:"RSAPublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPublicKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyExponent"}]},c={name:"RSAPrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPrivateKey.version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyCoefficient"}]},f=[s.getOID("X25519"),s.getOID("X448"),s.getOID("Ed25519"),s.getOID("Ed448")];class l{constructor(t){const r={},n=t.validate(e.publicKeyValidator,r);if(null!=n)throw new Error("Cannot read X.509 public key: "+n.message);this.oid=a.ASN1.parseOID(r.publicKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=t,this._keyRaw=a.ASN1.parseBitString(r.publicKey.bytes).buf,this._finalKey=this._keyRaw,this._finalPEM=""}static fromPEM(t){const e=a.PEM.parse(t)[0];if(e.procType.includes("ENCRYPTED"))throw new Error("Could not convert public key from PEM, PEM is encrypted.");const r=a.ASN1.fromDER(e.body,!0);switch(e.type){case"PUBLIC KEY":return new l(r);case"RSA PUBLIC KEY":const t=a.ASN1.Seq([a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),a.ASN1.BitString(r.DER)]);return new l(t);default:throw new Error("Could not convert public key from PEM, recommend PKCS#8 PEM")}}static addVerifier(t,e){if(""===(t=s.getOID(t)))throw new Error("Invalid object identifier: "+t);if(null!=l._verifiers[t])throw new Error(`Verifier ${t} exists`);l._verifiers[t]=e}get keyRaw(){return this._finalKey}verify(t,e,r){const n=l._verifiers[this.oid];if(null!=n){const o=i.createHash(r).update(t).digest();return n.call(this,o,e)}const o=i.createVerify(r);return o.update(t),o.verify(this.toPEM(),e)}getFingerprint(t,e="PublicKey"){let r;switch(e){case"PublicKeyInfo":r=this._pkcs8.DER;break;case"PublicKey":r=this._keyRaw;break;default:throw new Error(`Unknown fingerprint type "${e}".`)}const n=i.createHash(t);return n.update(r),n.digest()}toASN1(){return this._pkcs8}toDER(){return this._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("PUBLIC KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{oid:this.oid,algo:this.algo,publicKey:this._keyRaw}}[n.inspect.custom](t,e){return`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}l._verifiers=Object.create(null),e.PublicKey=l;class h{constructor(t){const r=Object.create(null),n=t.validate(e.privateKeyValidator,r);if(null!=n)throw new Error("Cannot read X.509 private key: "+n.message);if(this.version=a.ASN1.parseIntegerNum(r.privateKeyVersion.bytes)+1,this.oid=a.ASN1.parseOID(r.privateKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=t,this._keyRaw=r.privateKey.bytes,this._publicKeyRaw=null,this._finalKey=this._keyRaw,this._finalPEM="",f.includes(this.oid))if(this._finalKey=this._keyRaw=a.ASN1.parseDER(this._keyRaw,a.Class.UNIVERSAL,a.Tag.OCTETSTRING).bytes,"1.3.101.112"===this.oid){const t=o.sign.keyPair.fromSeed(this._keyRaw);this._publicKeyRaw=Buffer.from(t.publicKey),this._finalKey=Buffer.from(t.secretKey)}else if(2===this.version)for(const e of t.mustCompound())e.class===a.Class.CONTEXT_SPECIFIC&&1===e.tag&&(this._publicKeyRaw=a.ASN1.parseBitString(e.bytes).buf,this._finalKey=Buffer.concat([this._keyRaw,this._publicKeyRaw]))}static fromPEM(t){const e=a.PEM.parse(t)[0];if(e.procType.includes("ENCRYPTED"))throw new Error("Could not convert private key from PEM, PEM is encrypted.");let r=a.ASN1.fromDER(e.body,!0);switch(e.type){case"PRIVATE KEY":return new h(r);case"RSA PRIVATE KEY":return r=a.ASN1.Seq([r.value[0],a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),new a.ASN1(a.Class.UNIVERSAL,a.Tag.OCTETSTRING,r.DER)]),new h(r);default:throw new Error("Could not convert private key from PEM, recommend PKCS#8 PEM")}}static addSigner(t,e){if(""===(t=s.getOID(t)))throw new Error("Invalid object identifier: "+t);if(null!=h._signers[t])throw new Error(`Signer ${t} exists`);h._signers[t]=e}get keyRaw(){return this._finalKey}get publicKeyRaw(){return this._publicKeyRaw}sign(t,e){const r=h._signers[this.oid];if(null!=r){const n=i.createHash(e).update(t).digest();return r.call(this,n)}const n=i.createSign(e);return n.update(t),n.sign(this.toPEM())}toASN1(){return this._pkcs8}toDER(){return this._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("PRIVATE KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,privateKey:this._keyRaw,publicKey:this._publicKeyRaw}}[n.inspect.custom](t,e){return`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}h._signers=Object.create(null),e.PrivateKey=h;class p extends l{static fromPublicKey(t){return new p(t.toASN1())}constructor(t){if(super(t),s.getOID(this.oid)!==s.getOID("rsaEncryption"))throw new Error("Invalid RSA public key, unknown OID: "+this.oid);const e=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);const r=this._pkcs1.validate(u,e);if(null!=r)throw new Error("Cannot read RSA public key: "+r.message);this.modulus=a.ASN1.parseIntegerStr(e.publicKeyModulus.bytes),this.exponent=a.ASN1.parseIntegerNum(e.publicKeyExponent.bytes)}toASN1(){return this._pkcs1}toDER(){return this._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("RSA PUBLIC KEY",this._keyRaw).toString()),this._finalPEM}toPublicKeyPEM(){return new a.PEM("PUBLIC KEY",this._pkcs8.DER).toString()}toJSON(){return{oid:this.oid,algo:this.algo,modulus:y(this.modulus),exponent:this.exponent}}[n.inspect.custom](t,e){return`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}e.RSAPublicKey=p;class d extends h{static fromPrivateKey(t){return new d(t.toASN1())}constructor(t){if(super(t),s.getOID(this.oid)!==s.getOID("rsaEncryption"))throw new Error("Invalid RSA private key, unknown OID: "+this.oid);const e=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);const r=this._pkcs1.validate(c,e);if(null!=r)throw new Error("Cannot read RSA private key: "+r.message);this.publicExponent=a.ASN1.parseIntegerNum(e.privateKeyPublicExponent.bytes),this.privateExponent=a.ASN1.parseIntegerStr(e.privateKeyPrivateExponent.bytes),this.modulus=a.ASN1.parseIntegerStr(e.privateKeyModulus.bytes),this.prime1=a.ASN1.parseIntegerStr(e.privateKeyPrime1.bytes),this.prime2=a.ASN1.parseIntegerStr(e.privateKeyPrime2.bytes),this.exponent1=a.ASN1.parseIntegerStr(e.privateKeyExponent1.bytes),this.exponent2=a.ASN1.parseIntegerStr(e.privateKeyExponent2.bytes),this.coefficient=a.ASN1.parseIntegerStr(e.privateKeyCoefficient.bytes)}toASN1(){return this._pkcs1}toDER(){return this._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("RSA PRIVATE KEY",this._keyRaw).toString()),this._finalPEM}toPrivateKeyPEM(){return new a.PEM("PRIVATE KEY",this._pkcs8.DER).toString()}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,publicExponent:this.publicExponent,privateExponent:y(this.privateExponent),modulus:y(this.modulus),prime1:y(this.prime1),prime2:y(this.prime2),exponent1:y(this.exponent1),exponent2:y(this.exponent2),coefficient:y(this.coefficient)}}[n.inspect.custom](t,e){return`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}function y(t){return t.length%8!=0&&t.startsWith("00")?t.slice(2):t}e.RSAPrivateKey=d,l.addVerifier(s.getOID("Ed25519"),(function(t,e){return o.sign.detached.verify(t,e,this.keyRaw)})),h.addSigner(s.getOID("Ed25519"),(function(t){const e=this.keyRaw;if(64!==e.length)throw new Error("Invalid signing key.");return Buffer.from(o.sign.detached(t,e))}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(22);e.BufferVisitor=n.BufferVisitor;var i=r(78);e.PEM=i.PEM;var o=r(79);e.ASN1=o.ASN1,e.Class=o.Class,e.Tag=o.Tag,e.BitString=o.BitString},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.BufferVisitor=class{constructor(t,e=0,r=0){this.start=e,this.end=r>e?r:e,this.buf=t}get length(){return this.buf.length}reset(t=0,e=0){return this.start=t,e>=this.start?this.end=e:this.end<this.start&&(this.end=this.start),this}walk(t){return this.start=this.end,this.end+=t,this}mustHas(t,e="Too few bytes to parse."){const r=this.end+t;if(r>this.buf.length){const t=new Error(e);throw t.available=this.buf.length,t.requested=r,t}return this.walk(0),this}mustWalk(t,e){return this.mustHas(t,e),this.walk(t),this}}},function(t,e,r){"use strict";var n=u(r(24)),i=u(r(30)),o=u(r(83)),a=u(r(84)),s=r(3);function u(t){return t&&t.__esModule?t:{default:t}}t.exports={initWeixin:(t={})=>(t.clientType=t.clientType||__ctx__.PLATFORM,(0,s.createApi)(n.default,t)),initAlipay:(t={})=>(t.clientType=t.clientType||__ctx__.PLATFORM,(0,s.createApi)(i.default,t)),initAppleIapPayment:(t={})=>(t.clientType=t.clientType||__ctx__.PLATFORM,(0,s.createApi)(o.default,t)),initWeixinV3:(t={})=>(t.clientType=t.clientType||__ctx__.PLATFORM,(0,s.createApi)(a.default,t))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(25)),i=a(r(29)),o=r(3);function a(t){return t&&t.__esModule?t:{default:t}}e.default=class{constructor(t={}){if(!t.appId)throw new Error("appId required");if(!t.mchId)throw new Error("mchId required");if(!t.key)throw new Error("key required");t.signType=t.signType||"MD5",this.options=Object.assign({},t),this._protocols=i.default,this.baseUrl="https://api.mch.weixin.qq.com",this.paths={unifiedOrder:"/pay/unifiedorder",orderQuery:"/pay/orderquery",closeOrder:"/pay/closeorder",refund:"/secapi/pay/refund",refundQuery:"/pay/refundquery",downloadBill:"/pay/downloadbill",downloadFundflow:"/pay/downloadfundflow",getsignkey:"/pay/getsignkey"}}_getSign(t,e){const r=n.default.getSignStr(t)+"&key="+this.options.key;switch(e){case"MD5":return n.default.md5(r).toUpperCase();case"HMAC-SHA256":return n.default.sha256(r,this.options.key).toUpperCase();default:throw new Error("signType Error")}}_normalizeResult(t,e){return t.returnMsg=t.returnMsg||("SUCCESS"===t.returnCode?"ok":"fail"),t.errMsg=`payment.${e} ${t.returnMsg.toLowerCase()}`,t}_parse(t,e,r){const i=n.default.parseXML(t);if("FAIL"===i.return_code)throw new Error(""+i.return_msg);if("getSandboxKey"!==e){if(i.appid!==this.options.appId)throw new Error("appId不匹配");if(i.mch_id!==this.options.mchId)throw new Error("mchId不匹配");if(i.sign!==this._getSign(i,r))throw new Error("返回结果签名错误");i.app_id=i.appid,delete i.appid}if("FAIL"===i.result_code)throw new Error(`${i.err_code} ${i.err_code_des}`);return this._normalizeResult((0,o.snake2camelJson)(i),e)}_parseBill(t,e){const r={};if(n.default.isXML(t)){const e=n.default.parseXML(t);if("FAIL"===e.return_code)throw new Error(""+e.return_msg);if("FAIL"===e.result_code)throw new Error(`${e.err_code} ${e.err_code_des}`)}else r.returnCode="SUCCESS",r.content=t;return this._normalizeResult(r,e)}_getPublicParams(){const{appId:t,mchId:e,subAppId:r,subMchId:i}=this.options;return r?{appid:t,mchId:e,nonceStr:n.default.getNonceStr(),subAppid:r,subMchId:i}:{appid:t,mchId:e,nonceStr:n.default.getNonceStr()}}async _requestWxpay(t,e,r=!1){if(r&&!this.options.pfx)throw new Error("此接口需要微信支付证书(请传入pfx字段)");"getSandboxKey"!==e&&await this._initSandbox();const i=t.signType||this.options.signType;(t=(0,o.camel2snakeJson)(t)).sign=this._getSign(t,i);const a={method:"POST",dataType:"text",data:n.default.buildXML(t),timeout:this.options.timeout};r&&(a.pfx=this.options.pfx,a.passphrase=this.options.mchId);const{status:s,data:u}=await uniCloud.httpclient.request(this.options.sandbox?`${this.baseUrl}/sandboxnew${this.paths[e]}`:`${this.baseUrl}${this.paths[e]}`,a);if(200!==s)throw new Error("request fail");return-1!==["downloadBill","downloadFundflow"].indexOf(e)?this._parseBill(u,e):this._parse(u,e,i)}async getSandboxKey(){const t={mchId:this.options.mchId,nonceStr:n.default.getNonceStr()};return await this._requestWxpay(t,"getSandboxKey")}async _initSandbox(){this.options.sandbox&&!this.options.sandboxKey&&(this.options.key=this.options.sandboxKey=await this.getSandboxKey().sandbox_signkey)}async unifiedOrder(t){let e;if(t.tradeType)e=t.tradeType;else switch(this.options.clientType){case"app-plus":case"app":e="APP";break;case"mp-weixin":default:e="JSAPI"}const r=this._getPublicParams();r.subAppid&&(t.sub_openid=t.openid),("JSAPI"!==e||r.subAppid)&&delete t.openid;const n={...t,...r,spbillCreateIp:t.spbillCreateIp||"127.0.0.1",tradeType:e};return await this._requestWxpay(n,"unifiedOrder")}_getPayParamsByPrepayId(t,e){let r;switch(this.options.clientType){case"app-plus":case"app":r={appid:this.options.subAppId?this.options.subAppId:this.options.appId,noncestr:n.default.getNonceStr(),package:"Sign=WXPay",partnerid:this.options.mchId,prepayid:t,timestamp:""+(Date.now()/1e3|0)},r.sign=this._getSign(r,e);break;case"mp-weixin":default:{const i=""+(Date.now()/1e3|0);r={appId:this.options.subAppId?this.options.subAppId:this.options.appId,nonceStr:n.default.getNonceStr(),package:"prepay_id="+t,timeStamp:i},r.signType=e,r.paySign=this._getSign(r,e),r.timestamp=i;break}}return r}async getOrderInfo(t){let e;if(t.tradeType)e=t.tradeType;else switch(this.options.clientType){case"app-plus":case"app":e="APP";break;case"mp-weixin":default:e="JSAPI"}"JSAPI"!==e&&delete t.openid,t.tradeType=e;const r=await this.unifiedOrder(t);if("NATIVE"===e||"MWEB"===e)return r;if(!r.prepayId)throw new Error(r.errMsg||"获取prepayId失败");return this._getPayParamsByPrepayId(r.prepayId,t.signType||this.options.signType)}async orderQuery(t){const e={...t,...this._getPublicParams()};return await this._requestWxpay(e,"orderQuery")}async closeOrder(t){const e={...t,...this._getPublicParams()};return await this._requestWxpay(e,"closeOrder")}async refund(t){const e={...t,...this._getPublicParams()};return await this._requestWxpay(e,"refund",!0)}async refundQuery(t){const e={...t,...this._getPublicParams()};return await this._requestWxpay(e,"refundQuery")}async downloadBill(t){const e={...t,...this._getPublicParams(),billType:t.billType||"ALL"};return await this._requestWxpay(e,"downloadBill")}async downloadFundflow(t){const e={...t,...this._getPublicParams(),signType:t.signType||"HMAC-SHA256",accountType:t.accountType||"Basic"};return await this._requestWxpay(e,"downloadFundflow",!0)}_getNotifyData(t){let e=t.body;return t.isBase64Encoded&&(e=Buffer.from(e,"base64").toString("utf-8")),n.default.parseXML(e)}_verifyNotify(t,e){const r=this._getNotifyData(t);if("FAIL"===r.return_code)throw new Error(`${r.return_code} ${r.return_msg}`);if(r.appid!==this.options.appId)throw new Error("appId不匹配");if(r.mch_id!==this.options.mchId)throw new Error("mchId不匹配");if(e&&r.sign!==this._getSign(r,this.options.signType))throw new Error("通知验签未通过");const n=(0,o.snake2camelJson)(r);return n.appId=n.appid,delete n.appid,n}verifyPaymentNotify(t){return"payment"===this.checkNotifyType(t)&&this._verifyNotify(t,!0)}verifyRefundNotify(t){if("refund"!==this.checkNotifyType(t))return!1;const e=this._verifyNotify(t,!1),r=(0,o.snake2camelJson)(n.default.parseXML(n.default.decryptData(e.reqInfo,n.default.md5(this.options.key))));return Object.assign(e,r),delete e.reqInfo,e}checkNotifyType(t){const e=this._getNotifyData(t);return"total_fee"in e?"payment":"req_info"in e?"refund":"payment"}},t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(2))&&n.__esModule?n:{default:n},o=r(3);var a={decryptData:function(t,e,r=""){const n=i.default.createDecipheriv("aes-256-ecb",e,r);n.setAutoPadding(!0);let o=n.update(t,"base64","utf8");return o+=n.final("utf8"),o},md5:function(t,e="utf8"){return i.default.createHash("md5").update(t,e).digest("hex")},sha256:function(t,e,r="utf8"){return i.default.createHmac("sha256",e).update(t,r).digest("hex")},getSignStr:function(t){return Object.keys(t).filter(e=>"sign"!==e&&void 0!==t[e]&&""!==t[e]).sort().map(e=>e+"="+((0,o.isPlainObject)(t[e])?JSON.stringify(t[e]):t[e])).join("&")},getNonceStr:function(t=16){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)},buildXML:function(t,e="xml"){return`<${e}>${Object.keys(t).map(e=>(0,o.isPlainObject)(t[e])?`<${e}><![CDATA[${JSON.stringify(t[e])}]]></${e}>`:`<${e}><![CDATA[${t[e]}]]></${e}>`).join("")}</${e}>`},parseXML:function(t){const e=/<(?:xml|root).*?>([\s|\S]*)<\/(?:xml|root)>/.exec(t)[1],r={},n=/<(.*?)>(?:<!\[CDATA\[){0,1}(.*?)(?:\]\]>){0,1}<\/.*?>/g;let i=null;for(;i=n.exec(e);)r[i[1]]=i[2];return r},isXML:function(t){return/^(<\?xml.*\?>)?(\r?\n)*<xml>(.|\r?\n)*<\/xml>$/i.test(t.trim())}};e.default=a,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=class{constructor(){this._boundary="------FormDataBaseBoundary"+Math.random().toString(36).substring(2),this.dataList=[]}_addData(t){const e=this.dataList[this.dataList.length-1];"string"==typeof t&&"string"==typeof e?this.dataList[this.dataList.length-1]=e+"\r\n"+t:this.dataList.push(t)}append(t,e,r){this._addData("--"+this._boundary);let n=`Content-Disposition: form-data; name="${t}"`;switch(Buffer.isBuffer(e)){case!0:if(!r.filename||!r.contentType)throw new Error("filename and contentType required");n+=`; filename="${r.filename}"`,this._addData(n),this._addData("Content-Type: "+r.contentType),this._addData(""),this._addData(e);break;default:this._addData(""),this._addData(e)}}getHeaders(t){const e={"Content-Type":"multipart/form-data; boundary="+this._boundary};return Object.assign(e,t)}getBuffer(){let t=Buffer.alloc(0);return this.dataList.forEach(e=>{t=Buffer.isBuffer(e)?Buffer.concat([t,e]):Buffer.concat([t,Buffer.from(""+e)]),t=Buffer.concat([t,Buffer.from("\r\n")])}),t=Buffer.concat([t,Buffer.from("--"+this._boundary+"--")]),t}},t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;class n extends Error{constructor(t){super(t.message),this.errMsg=t.message||"",this.errCode=t.code||"",Object.defineProperties(this,{message:{get(){return`errCode: ${this.errCode} | errMsg: `+this.errMsg},set(t){this.errMsg=t}}})}}e.default=n,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createApi=function(t,e){const r=new t(e);return new Proxy(r,{get:function(t,e){if("function"==typeof t[e]&&0!==e.indexOf("_")&&t._protocols&&t._protocols[e]){const r=t._protocols[e];return async function(n){n=i(n,r.args);let o=await t[e](n);return o=i(o,r.returnValue),o}}return t[e]}})};var n=r(7);function i(t={},e){if(!e||!t)return t;const r=["_pre","_purify","_post"];e._pre&&(t=e._pre(t));let i={shouldDelete:new Set([])};if(e._purify){const t=e._purify;for(const e in t)t[e]=new Set(t[e]);i=Object.assign(i,t)}if((0,n.isPlainObject)(e))for(const o in e){const a=e[o];if((0,n.isFn)(a)&&-1===r.indexOf(o))t[o]=a(t);else if("string"==typeof a&&/\./g.test(a)){const e=a.split(".");t[o]=e.reduce((t,e)=>t[e],t),i.shouldDelete.add(a)}else if("string"==typeof a&&/\./g.test(o)){const e=o.split(".");let r=t;for(const[n,i]of e.entries())r[i]||(r[i]=n+1>=e.length?t[a]:{}),r=r[i];i.shouldDelete.add(a)}else"string"==typeof a&&-1===r.indexOf(o)&&(t[o]=t[a],i.shouldDelete.add(a))}else(0,n.isFn)(e)&&(t=e(t));if(i.shouldDelete)for(const e of i.shouldDelete)/\./g.test(e)?(0,n.deleteObjectKey)(e.split("."),t):delete t[e];return e._post&&(t=e._post(t)),t}},function(t,e,r){"use strict";function n(t,e){e.forEach(e=>{void 0!==t[e]&&(t[e]=Number(t[e]))})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={unifiedOrder:{args:{_purify:{shouldDelete:["subject"]}}},getOrderInfo:{args:{_purify:{shouldDelete:["subject"]}}},orderQuery:{returnValue:function(t){n(t,["cashFee","totalFee","couponCount"]),t.couponList=[];const e=t.couponCount||0;for(let r=0;r<e;r++)t.couponList.push({couponId:t["couponId"+r],couponType:t["couponType"+r],couponFee:Number(t["couponFee"+r])}),delete t["couponId"+r],delete t["couponType"+r],delete t["couponFee"+r];return t}},refund:{returnValue:function(t){n(t,["refundFee","settlementRefundFee","totalFee","settlementTotalFee","cashFee","cashRefundFee","couponRefundFee","couponRefundCount"]),t.couponList=[];const e=t.couponRefundCount||0;for(let r=0;r<e;r++)t.couponList.push({couponRefundId:t["couponRefundId"+r],couponType:t["couponType"+r],couponRefundFee:Number(t["couponRefundFee"+r])}),delete t["couponRefundId"+r],delete t["couponType"+r],delete t["couponRefundFee"+r];return t}},refundQuery:{returnValue:function(t){n(t,["totalFee","refundFee","settlementTotalFee","cashFee","refundCount"]),t.refundList=[];for(let e=0;e<t.refundCount;e++){t["refundFee"+e]=Number(t["refundFee"+e]),t["couponRefundFee"+e]=Number(t["couponRefundFee"+e]),t["settlementRefundFee"+e]=Number(t["settlementRefundFee"+e]);const r=Number(t["couponRefundCount"+e])||0,n={outRefundNo:t["outRefundNo"+e],refundId:t["refundId"+e],refundChannel:t["refundChannel"+e],refundFee:Number(t["refundFee"+e]),settlementRefundFee:Number(t["settlementRefundFee"+e]),couponRefundFee:Number(t["couponRefundFee"+e]),couponRefundCount:r,refundStatus:t["refundStatus"+e],refundAccount:t["refundAccount"+e],refundRecvAccout:t["refundRecvAccout"+e],refundSuccessTime:t["refundSuccessTime"+e],couponList:[]};delete t["outRefundNo"+e],delete t["refundId"+e],delete t["refundChannel"+e],delete t["refundFee"+e],delete t["settlementRefundFee"+e],delete t["couponRefundFee"+e],delete t["couponRefundCount"+e],delete t["refundStatus"+e],delete t["refundAccount"+e],delete t["refundRecvAccout"+e],delete t["refundSuccessTime"+e];for(let i=0;i<r;i++)n.couponList.push({couponRefundId:t[`couponRefundId${e}${i}`],couponType:t[`couponType${e}${i}`],couponRefundFee:Number(t[`couponRefundId${e}${i}`])}),delete t[`couponRefundId${e}${i}`],delete t[`couponType${e}${i}`],delete t[`couponRefundFee${e}${i}`];t.refundList.push(n)}return t}},verifyPaymentNotify:{returnValue:function(t){n(t,["cashFee","totalFee","couponCount"]);const e=t.couponCount||0;t.couponList=[];for(let r=0;r<e;r++)t.couponList.push({couponId:t["couponId"+r],couponType:t["couponType"+r],couponFee:Number(t["couponFee"+r])}),delete t["couponId"+r],delete t["couponType"+r],delete t["couponFee"+r];return t}},verifyRefundNotify:{returnValue:function(t){return n(t,["refundFee","settlementRefundFee","settlementTotalFee","totalFee"]),t}},downloadBill:{args:{billDate:t=>t.billDate.replace(/-/g,"")}},downloadFundflow:{args:{billDate:t=>t.billDate.replace(/-/g,"")}}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(3),i=c(r(2)),o=c(r(31)),a=c(r(32)),s=c(r(82)),u=r(16);function c(t){return t&&t.__esModule?t:{default:t}}const f={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};class l extends a.default{constructor(t){t.sandbox&&(t.gateway="https://openapi.alipaydev.com/gateway.do"),super(t=Object.assign({gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:8,keyType:"PKCS8"},t)),this.options=t,this._protocols=s.default}async _request(t,e){const r={};e.notifyUrl&&(r.notifyUrl=e.notifyUrl,delete e.notifyUrl),r.bizContent=e;return await this.exec(t,r,{validateSign:!0})}async unifiedOrder(t){return await this._request("alipay.trade.create",Object.assign({sellerId:this.options.mchId},t))}_getSign(t,e){return(0,u.sign)(t,e,this.config)}formatUrl(t,e){let r=t;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","appCertSn","alipayRootCertSn"];for(const t in e)if(n.indexOf(t)>-1){const n=encodeURIComponent(e[t]);r=`${r}${r.includes("?")?"&":"?"}${t}=${n}`,delete e[t]}return{execParams:e,url:r}}async getOrderInfo(t){let e;if(t.tradeType)e=t.tradeType,delete t.tradeType;else switch(this.options.clientType){case"app-plus":case"app":e="APP";break;case"mp-alipay":default:e="JSAPI"}switch(e){case"APP":{delete t.buyerId;const e={};t.notifyUrl&&(e.notifyUrl=t.notifyUrl,delete t.notifyUrl),e.bizContent=t;const r=this._getSign("alipay.trade.app.pay",e),{url:n,execParams:i}=this.formatUrl("",r);return(n+"&biz_content="+encodeURIComponent(i.biz_content)).substr(1)}case"JSAPI":{const e=await this.unifiedOrder(t);if(!e.tradeNo)throw new Error("获取支付宝交易号失败,详细信息为:"+JSON.stringify(e));return e.tradeNo}case"NATIVE":return await this._request("alipay.trade.precreate",Object.assign({sellerId:this.options.mchId},t));default:throw new Error("不支持的支付类型,支付宝支付下单仅支持App、支付宝小程序、网站二维码支付")}}async orderQuery(t){return await this._request("alipay.trade.query",t)}async cancelOrder(t){return await this._request("alipay.trade.cancel",t)}async closeOrder(t){return await this._request("alipay.trade.close",t)}async refund(t){return await this._request("alipay.trade.refund",t)}async refundQuery(t){return await this._request("alipay.trade.fastpay.refund.query",t)}notifyRSACheck(t,e,r){const n=Object.keys(t).sort().filter(t=>t).map(e=>{let r=t[e];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),`${e}=${r}`}).join("&");return i.default.createVerify(f[r]).update(n,"utf8").verify(this.config.alipayPublicKey,e,"base64")}_getNotifyData(t){if(!t.headers)throw new Error("通知格式不正确");let e;for(const r in t.headers)"content-type"===r.toLowerCase()&&(e=t.headers[r]);if(!1!==t.isBase64Encoded&&-1===e.indexOf("application/x-www-form-urlencoded"))throw new Error("通知格式不正确");return o.default.parse(t.body)}_verifyNotify(t){const e=this._getNotifyData(t);return!!this.checkNotifySign(e)&&(0,n.snake2camelJson)(e)}verifyPaymentNotify(t){return"payment"===this.checkNotifyType(t)&&this._verifyNotify(t)}verifyRefundNotify(t){return"refund"===this.checkNotifyType(t)&&this._verifyNotify(t)}checkNotifyType(t){return"refund_fee"in this._getNotifyData(t)?"refund":"payment"}}e.default=l,t.exports=e.default},function(t,e){t.exports=require("querystring")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(10),i=r(33),o=r(2),a=r(34),s=r(35),u=r(36),c=r(38),f=r(39),l=r(15),h=r(16),p=r(74),d=r(81);e.default=class{constructor(t){if(!t.appId)throw Error("config.appId is required");if(!t.privateKey)throw Error("config.privateKey is required");const e="PKCS8"===t.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";t.privateKey=this.formatKey(t.privateKey,e),t.appCertPath||t.appCertContent?(t.appCertSn=i.empty(t.appCertContent)?p.getSNFromPath(t.appCertPath,!1):p.getSN(t.appCertContent,!1),t.alipayCertSn=i.empty(t.alipayPublicCertContent)?p.getSNFromPath(t.alipayPublicCertPath,!1):p.getSN(t.alipayPublicCertContent,!1),t.alipayRootCertSn=i.empty(t.alipayRootCertContent)?p.getSNFromPath(t.alipayRootCertPath,!0):p.getSN(t.alipayRootCertContent,!0),t.alipayPublicKey=i.empty(t.alipayPublicCertContent)?p.loadPublicKeyFromPath(t.alipayPublicCertPath):p.loadPublicKey(t.alipayPublicCertContent),t.alipayPublicKey=this.formatKey(t.alipayPublicKey,"PUBLIC KEY")):t.alipayPublicKey&&(t.alipayPublicKey=this.formatKey(t.alipayPublicKey,"PUBLIC KEY")),this.config=Object.assign({urllib:a,gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,camelcase:!0,signType:"RSA2",charset:"utf-8",version:"1.0"},f(t,{deep:!0})),this.sdkVersion="alipay-sdk-nodejs-"+d.version}formatKey(t,e){const r=t.split("\n").map(t=>t.trim());return r[0].includes(e)&&r.shift(),r[r.length-1].includes(e)&&r.pop(),`-----BEGIN ${e}-----\n${r.join("")}\n-----END ${e}-----`}formatUrl(t,e){let r=t;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","ws_service_url"];for(const t in e)if(n.indexOf(t)>-1){const n=encodeURIComponent(e[t]);r=`${r}${r.includes("?")?"&":"?"}${t}=${n}`,delete e[t]}return{execParams:e,url:r}}multipartExec(t,e={}){const r=this.config;let o={},a={};const p=e.log&&i.fn(e.log.info)?e.log.info:null,d=e.log&&i.fn(e.log.error)?e.log.error:null;e.formData.getFields().forEach(t=>{o[t.name]=t.value,a[t.name]=t.value}),o=f(o,{deep:!0}),a=l(a),e.formData.getFiles().forEach(t=>{const e=c(t.fieldName);a[e]=u.isValid(t.path)?s(t.path):n.createReadStream(t.path)});const y=h.sign(t,o,r),{url:g}=this.formatUrl(r.gateway,y);return p&&p("[AlipaySdk]start exec url: %s, method: %s, params: %s",g,t,JSON.stringify(o)),new Promise((n,i)=>{s.post({url:g,formData:a,json:!1,timeout:r.timeout,headers:{"user-agent":this.sdkVersion}},(o,a,s)=>{if(o)return o.message="[AlipaySdk]exec error",d&&d(o),i(o);p&&p("[AlipaySdk]exec response: %s",s);try{let o,a;const u=JSON.parse(s);if(a=t.replace(/\./g,"_")+"_response",o=u[a],o){return!e.validateSign||this.checkResponseSign(s,a)?n(r.camelcase?f(o,{deep:!0}):o):i({serverResult:s,errorMessage:"[AlipaySdk]验签失败"})}}catch(t){return i({serverResult:s,errorMessage:"[AlipaySdk]Response 格式错误"})}return i({serverResult:s,errorMessage:"[AlipaySdk]HTTP 请求错误"})})})}pageExec(t,e={}){let r={alipaySdk:this.sdkVersion};const n=this.config,o=e.log&&i.fn(e.log.info)?e.log.info:null;e.formData.getFields().forEach(t=>{r[t.name]=t.value}),r=f(r,{deep:!0});const a=h.sign(t,r,n),{url:s,execParams:u}=this.formatUrl(n.gateway,a);return o&&o("[AlipaySdk]start exec url: %s, method: %s, params: %s",s,t,JSON.stringify(r)),"get"===e.formData.getMethod()?new Promise(t=>{const e=Object.keys(u).map(t=>`${t}=${encodeURIComponent(u[t])}`);t(`${s}&${e.join("&")}`)}):new Promise(t=>{const e="alipaySDKSubmit"+Date.now();t(`\n <form action="${s}" method="post" name="${e}" id="${e}">\n ${Object.keys(u).map(t=>`<input type="hidden" name="${t}" value="${String(u[t]).replace(/\"/g,""")}" />`).join("")}\n </form>\n <script>document.forms["${e}"].submit();<\/script>\n `)})}notifyRSACheck(t,e,r,n){const i=Object.keys(t).sort().filter(t=>t).map(e=>{let r=t[e];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),n?`${e}=${r}`:`${e}=${decodeURIComponent(r)}`}).join("&");return o.createVerify(h.ALIPAY_ALGORITHM_MAPPING[r]).update(i,"utf8").verify(this.config.alipayPublicKey,e,"base64")}getSignStr(t,e){let r=t.trim();const n=t.indexOf(e+'"'),i=t.lastIndexOf('"sign"');return r=r.substr(n+e.length+1),r=r.substr(0,i),r=r.replace(/^[^{]*{/g,"{"),r=r.replace(/\}([^}]*)$/g,"}"),r}exec(t,e={},r={}){if(r.formData)return r.formData.getFiles().length>0?this.multipartExec(t,r):this.pageExec(t,r);const n=this.config,o=h.sign(t,e,n),{url:a,execParams:s}=this.formatUrl(n.gateway,o),u=r.log&&i.fn(r.log.info)?r.log.info:null,c=r.log&&i.fn(r.log.error)?r.log.error:null;return u&&u("[AlipaySdk]start exec, url: %s, method: %s, params: %s",a,t,JSON.stringify(s)),new Promise((i,o)=>{n.urllib.request(a,{method:"POST",data:s,dataType:"text",timeout:n.timeout,headers:{"user-agent":this.sdkVersion}}).then(a=>{if(u&&u("[AlipaySdk]exec response: %s",a),200===a.status){let s,u;try{const e=JSON.parse(a.data);u=t.replace(/\./g,"_")+"_response",s=e[u]}catch(t){return o({serverResult:a,errorMessage:"[AlipaySdk]Response 格式错误"})}if(s){e.needEncrypt&&(s=h.aesDecrypt(s,n.encryptKey));return!r.validateSign||this.checkResponseSign(a.data,u)?i(n.camelcase?f(s,{deep:!0}):s):o({serverResult:a,errorMessage:"[AlipaySdk]验签失败"})}return o({serverResult:a,errorMessage:"[AlipaySdk]HTTP 请求错误"})}o({serverResult:a,errorMessage:"[AlipaySdk]HTTP 请求错误"})}).catch(t=>{t.message="[AlipaySdk]exec error",c&&c(t),o(t)})})}checkResponseSign(t,e){if(!this.config.alipayPublicKey||""===this.config.alipayPublicKey)return console.warn("config.alipayPublicKey is empty"),!0;if(!t)return!1;const r=this.getSignStr(t,e),n=JSON.parse(t).sign,i=o.createVerify(h.ALIPAY_ALGORITHM_MAPPING[this.config.signType]);return i.update(r,"utf8"),i.verify(this.config.alipayPublicKey,n,"base64")}checkNotifySign(t,e){const r=t.sign;if(!this.config.alipayPublicKey||!r)return!1;const n=t.sign_type||this.config.signType||"RSA2",i=Object.assign({},t);delete i.sign,i.sign_type=n;return!!this.notifyRSACheck(i,r,n,e)||(delete i.sign_type,this.notifyRSACheck(i,r,n,e))}}},function(t,e,r){"use strict";
|
||
/**!
|
||
* is
|
||
* the definitive JavaScript type testing library
|
||
*
|
||
* @copyright 2013-2014 Enrico Marino / Jordan Harband
|
||
* @license MIT
|
||
*/var n,i,o=Object.prototype,a=o.hasOwnProperty,s=o.toString;"function"==typeof Symbol&&(n=Symbol.prototype.valueOf),"function"==typeof BigInt&&(i=BigInt.prototype.valueOf);var u=function(t){return t!=t},c={boolean:1,number:1,string:1,undefined:1},f=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/,l=/^[A-Fa-f0-9]+$/,h={};h.a=h.type=function(t,e){return typeof t===e},h.defined=function(t){return void 0!==t},h.empty=function(t){var e,r=s.call(t);if("[object Array]"===r||"[object Arguments]"===r||"[object String]"===r)return 0===t.length;if("[object Object]"===r){for(e in t)if(a.call(t,e))return!1;return!0}return!t},h.equal=function(t,e){if(t===e)return!0;var r,n=s.call(t);if(n!==s.call(e))return!1;if("[object Object]"===n){for(r in t)if(!h.equal(t[r],e[r])||!(r in e))return!1;for(r in e)if(!h.equal(t[r],e[r])||!(r in t))return!1;return!0}if("[object Array]"===n){if((r=t.length)!==e.length)return!1;for(;r--;)if(!h.equal(t[r],e[r]))return!1;return!0}return"[object Function]"===n?t.prototype===e.prototype:"[object Date]"===n&&t.getTime()===e.getTime()},h.hosted=function(t,e){var r=typeof e[t];return"object"===r?!!e[t]:!c[r]},h.instance=h.instanceof=function(t,e){return t instanceof e},h.nil=h.null=function(t){return null===t},h.undef=h.undefined=function(t){return void 0===t},h.args=h.arguments=function(t){var e="[object Arguments]"===s.call(t),r=!h.array(t)&&h.arraylike(t)&&h.object(t)&&h.fn(t.callee);return e||r},h.array=Array.isArray||function(t){return"[object Array]"===s.call(t)},h.args.empty=function(t){return h.args(t)&&0===t.length},h.array.empty=function(t){return h.array(t)&&0===t.length},h.arraylike=function(t){return!!t&&!h.bool(t)&&a.call(t,"length")&&isFinite(t.length)&&h.number(t.length)&&t.length>=0},h.bool=h.boolean=function(t){return"[object Boolean]"===s.call(t)},h.false=function(t){return h.bool(t)&&!1===Boolean(Number(t))},h.true=function(t){return h.bool(t)&&!0===Boolean(Number(t))},h.date=function(t){return"[object Date]"===s.call(t)},h.date.valid=function(t){return h.date(t)&&!isNaN(Number(t))},h.element=function(t){return void 0!==t&&"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&1===t.nodeType},h.error=function(t){return"[object Error]"===s.call(t)},h.fn=h.function=function(t){if("undefined"!=typeof window&&t===window.alert)return!0;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e},h.number=function(t){return"[object Number]"===s.call(t)},h.infinite=function(t){return t===1/0||t===-1/0},h.decimal=function(t){return h.number(t)&&!u(t)&&!h.infinite(t)&&t%1!=0},h.divisibleBy=function(t,e){var r=h.infinite(t),n=h.infinite(e),i=h.number(t)&&!u(t)&&h.number(e)&&!u(e)&&0!==e;return r||n||i&&t%e==0},h.integer=h.int=function(t){return h.number(t)&&!u(t)&&t%1==0},h.maximum=function(t,e){if(u(t))throw new TypeError("NaN is not a valid value");if(!h.arraylike(e))throw new TypeError("second argument must be array-like");for(var r=e.length;--r>=0;)if(t<e[r])return!1;return!0},h.minimum=function(t,e){if(u(t))throw new TypeError("NaN is not a valid value");if(!h.arraylike(e))throw new TypeError("second argument must be array-like");for(var r=e.length;--r>=0;)if(t>e[r])return!1;return!0},h.nan=function(t){return!h.number(t)||t!=t},h.even=function(t){return h.infinite(t)||h.number(t)&&t==t&&t%2==0},h.odd=function(t){return h.infinite(t)||h.number(t)&&t==t&&t%2!=0},h.ge=function(t,e){if(u(t)||u(e))throw new TypeError("NaN is not a valid value");return!h.infinite(t)&&!h.infinite(e)&&t>=e},h.gt=function(t,e){if(u(t)||u(e))throw new TypeError("NaN is not a valid value");return!h.infinite(t)&&!h.infinite(e)&&t>e},h.le=function(t,e){if(u(t)||u(e))throw new TypeError("NaN is not a valid value");return!h.infinite(t)&&!h.infinite(e)&&t<=e},h.lt=function(t,e){if(u(t)||u(e))throw new TypeError("NaN is not a valid value");return!h.infinite(t)&&!h.infinite(e)&&t<e},h.within=function(t,e,r){if(u(t)||u(e)||u(r))throw new TypeError("NaN is not a valid value");if(!h.number(t)||!h.number(e)||!h.number(r))throw new TypeError("all arguments must be numbers");return h.infinite(t)||h.infinite(e)||h.infinite(r)||t>=e&&t<=r},h.object=function(t){return"[object Object]"===s.call(t)},h.primitive=function(t){return!t||!("object"==typeof t||h.object(t)||h.fn(t)||h.array(t))},h.hash=function(t){return h.object(t)&&t.constructor===Object&&!t.nodeType&&!t.setInterval},h.regexp=function(t){return"[object RegExp]"===s.call(t)},h.string=function(t){return"[object String]"===s.call(t)},h.base64=function(t){return h.string(t)&&(!t.length||f.test(t))},h.hex=function(t){return h.string(t)&&(!t.length||l.test(t))},h.symbol=function(t){return"function"==typeof Symbol&&"[object Symbol]"===s.call(t)&&"symbol"==typeof n.call(t)},h.bigint=function(t){return"function"==typeof BigInt&&"[object BigInt]"===s.call(t)&&"bigint"==typeof i.call(t)},t.exports=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=uniCloud.httpclient;e.default=n,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={},t.exports=e.default},function(t,e,r){"use strict";var n=r(37);var i={Uri:{createUriRegex:function(t){if("object"!=typeof(t=t||{})||Array.isArray(t))throw new Error("options must be an object");var e="";if(t.scheme){if(Array.isArray(t.scheme)||(t.scheme=[t.scheme]),t.scheme.length<=0)throw new Error("scheme must have at least 1 scheme specified");for(var r=0;r<t.scheme.length;++r){var i=t.scheme[r];if(!(i instanceof RegExp||"string"==typeof i))throw new Error("scheme must only contain Regular Expressions or Strings");if(e+=e?"|":"",i instanceof RegExp)e+=i.source;else{if(!/[a-zA-Z][a-zA-Z0-9+-\.]*/.test(i))throw new Error("scheme at position "+r+" must be a valid scheme");e+=i.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}}}var o="(?:"+(e||n.scheme)+")";return new RegExp("^(?:"+o+":"+n.hierPart+")(?:\\?"+n.query+")?(?:#"+n.fragment+")?$")},uriRegex:new RegExp(n.uri)}};i.Uri.isValid=function(t){return i.Uri.uriRegex.test(t)},t.exports={createUriRegex:i.Uri.createUriRegex,uriRegex:i.Uri.uriRegex,isValid:i.Uri.isValid}},function(t,e,r){"use strict";var n={rfc3986:{},generate:function(){var t="|";n.rfc3986.cidr="[0-9]|[1-2][0-9]|3[0-2]";var e="!\\$&'\\(\\)\\*\\+,;=",r="a-zA-Z0-9-\\._~%0-9A-Fa-f"+e+":@",i="(?:0?0?[0-9]|0?[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";n.rfc3986.IPv4address="(?:"+i+"\\.){3}"+i;var o="[0-9A-Fa-f]{1,4}",a="(?:"+o+":"+o+"|"+n.rfc3986.IPv4address+")",s="(?:"+o+":){6}"+a,u="::(?:"+o+":){5}"+a,c="(?:"+o+")?::(?:"+o+":){4}"+a,f="(?:(?:"+o+":){0,1}"+o+")?::(?:"+o+":){3}"+a,l="(?:(?:"+o+":){0,2}"+o+")?::(?:"+o+":){2}"+a,h="(?:(?:"+o+":){0,3}"+o+")?::"+o+":"+a,p="(?:(?:"+o+":){0,4}"+o+")?::"+a;n.rfc3986.IPv6address="(?:"+s+t+u+t+c+t+f+t+l+t+h+t+p+"|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}"+"|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)",n.rfc3986.IPvFuture="v[0-9A-Fa-f]+\\.[a-zA-Z0-9-\\._~"+e+":]+",n.rfc3986.scheme="[a-zA-Z][a-zA-Z0-9+-\\.]*";n.rfc3986.IPLiteral="\\[(?:"+n.rfc3986.IPv6address+t+n.rfc3986.IPvFuture+")\\]";var d="(?:[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:]*@)?"+("(?:"+n.rfc3986.IPLiteral+t+n.rfc3986.IPv4address+"|[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=]{0,255})")+"(?::[0-9]*)?",y="(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*";n.rfc3986.hierPart="(?:(?:\\/\\/"+d+y+")"+"|\\/(?:[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]+(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*)?"+"|[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]+(?:\\/[a-zA-Z0-9-\\._~%0-9A-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*)",n.rfc3986.query="["+r+"\\/\\?]*(?=#|$)",n.rfc3986.fragment="["+r+"\\/\\?]*",n.rfc3986.uri="^(?:"+n.rfc3986.scheme+":"+n.rfc3986.hierPart+")(?:\\?"+n.rfc3986.query+")?(?:#"+n.rfc3986.fragment+")?$"}};n.generate(),t.exports=n.rfc3986},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(7).camel2snake;e.default=n,t.exports=e.default},function(t,e,r){"use strict";const n=r(14),i=r(40),o=r(41),a=new o({maxSize:1e5}),s=(t,e)=>{const r=(e=Object.assign({deep:!1},e)).exclude;return n(t,(t,e)=>{if(!r||!((t,e)=>t.some(t=>"string"==typeof t?t===e:t.test(e)))(r,t))if(a.has(t))t=a.get(t);else{const e=i(t);t.length<100&&a.set(t,e),t=e}return[t,e]},{deep:e.deep})};t.exports=(t,e)=>Array.isArray(t)?Object.keys(t).map(r=>s(t[r],e)):s(t,e)},function(t,e,r){"use strict";function n(t){let e=!1,r=!1,n=!1;for(let i=0;i<t.length;i++){const o=t[i];e&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(t=t.substr(0,i)+"-"+t.substr(i),e=!1,n=r,r=!0,i++):r&&n&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(t=t.substr(0,i-1)+"-"+t.substr(i-1),n=r,r=!1,e=!0):(e=o.toLowerCase()===o,n=r,r=o.toUpperCase()===o)}return t}t.exports=function(t){if(0===(t=arguments.length>1?Array.from(arguments).map(t=>t.trim()).filter(t=>t.length).join("-"):t.trim()).length)return"";if(1===t.length)return t.toLowerCase();if(/^[a-z0-9]+$/.test(t))return t;const e=t!==t.toLowerCase();return e&&(t=n(t)),t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(t,e)=>e.toUpperCase())}},function(t,e,r){"use strict";class n{constructor(t){if(!((t=Object.assign({},t)).maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const e=this.oldCache.get(t);return this._set(t,e),e}}set(t,e){return this.cache.has(t)?this.cache.set(t,e):this._set(t,e),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){return this.cache.has(t)?this.cache.get(t):this.oldCache.has(t)?this.oldCache.get(t):void 0}delete(t){this.cache.delete(t)&&this._size--,this.oldCache.delete(t)}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const t of this)yield t[0]}*values(){for(const t of this)yield t[1]}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache)this.cache.has(t[0])||(yield t)}get size(){let t=0;for(const e of this.oldCache)this.cache.has(e[0])||t++;return this._size+t}}t.exports=n},function(t,e,r){var n=r(43);t.exports=function(t){return n(t).replace(/\s/g,"_")}},function(t,e,r){var n=r(44);t.exports=function(t){return n(t).replace(/[\W_]+(.|$)/g,(function(t,e){return e?" "+e:""}))}},function(t,e){t.exports=function(t){if(r.test(t))return t.toLowerCase();i.test(t)&&(t=function(t){return t.replace(o,(function(t,e){return e?" "+e:""}))}(t));n.test(t)&&(t=function(t){return t.replace(a,(function(t,e,r){return e+" "+r.toLowerCase().split("").join(" ")}))}(t));return t.toLowerCase()};var r=/\s/,n=/[a-z][A-Z]/,i=/[\W_]/;var o=/[\W_]+(.|$)/g;var a=/(.)([A-Z]+)/g},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{format:function(){return(0,n.getFullTimeStr)((0,n.getOffsetDate)(8))}}};var n=r(7);t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={encode:t=>t};e.default=n,t.exports=e.default},function(t,e,r){var n;t.exports=(n=r(0),r(8),r(48),r(49),r(5),r(50),r(6),r(11),r(17),r(51),r(18),r(52),r(53),r(54),r(12),r(55),r(4),r(1),r(56),r(57),r(58),r(59),r(60),r(61),r(62),r(63),r(64),r(65),r(66),r(67),r(68),r(69),r(70),r(71),n)},function(t,e,r){var n;t.exports=(n=r(0),function(){if("function"==typeof ArrayBuffer){var t=n.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=t[i]<<24-i%4*8;e.call(this,n,r)}else e.apply(this,arguments)}).prototype=t}}(),n.lib.WordArray)},function(t,e,r){var n;t.exports=(n=r(0),function(){var t=n,e=t.lib.WordArray,r=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i+=2){var o=e[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var r=t.length,n=[],i=0;i<r;i++)n[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(n,2*r)}},r.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o+=2){var a=i(e[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var r=t.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(n,2*r)}}}(),n.enc.Utf16)},function(t,e,r){var n,i,o;t.exports=(o=r(0),i=(n=o).lib.WordArray,n.enc.Base64url={stringify:function(t,e=!0){var r=t.words,n=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u<n;u++)o.push(i.charAt(s>>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t,e=!0){var r=t.length,n=e?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<n.length;a++)o[n.charCodeAt(a)]=a}var s=n.charAt(64);if(s){var u=t.indexOf(s);-1!==u&&(r=u)}return function(t,e,r){for(var n=[],o=0,a=0;a<e;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2,u=r[t.charCodeAt(a)]>>>6-a%4*2,c=s|u;n[o>>>2]|=c<<24-o%4*8,o++}return i.create(n,o)}(t,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},o.enc.Base64url)},function(t,e,r){var n,i,o,a,s,u;t.exports=(u=r(0),r(17),i=(n=u).lib.WordArray,o=n.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),n.SHA224=a._createHelper(s),n.HmacSHA224=a._createHmacHelper(s),u.SHA224)},function(t,e,r){var n,i,o,a,s,u,c,f;t.exports=(f=r(0),r(8),r(18),i=(n=f).x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,c=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=u._doFinalize.call(this);return t.sigBytes-=16,t}}),n.SHA384=u._createHelper(c),n.HmacSHA384=u._createHmacHelper(c),f.SHA384)},function(t,e,r){var n;t.exports=(n=r(0),r(8),function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.x64.Word,s=e.algo,u=[],c=[],f=[];!function(){for(var t=1,e=0,r=0;r<24;r++){u[t+5*e]=(r+1)*(r+2)/2%64;var n=(2*t+3*e)%5;t=e%5,e=n}for(t=0;t<5;t++)for(e=0;e<5;e++)c[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,l=0,h=0;h<7;h++){if(1&i){var p=(1<<h)-1;p<32?l^=1<<p:s^=1<<p-32}128&i?i=i<<1^113:i<<=1}f[o]=a.create(s,l)}}();var l=[];!function(){for(var t=0;t<25;t++)l[t]=a.create()}();var h=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=t[e+2*i],a=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(R=r[i]).high^=a,R.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var p=0,d=0,y=0;y<5;y++)p^=(R=r[h+5*y]).high,d^=R.low;var g=l[h];g.high=p,g.low=d}for(h=0;h<5;h++){var v=l[(h+4)%5],_=l[(h+1)%5],m=_.high,b=_.low;for(p=v.high^(m<<1|b>>>31),d=v.low^(b<<1|m>>>31),y=0;y<5;y++)(R=r[h+5*y]).high^=p,R.low^=d}for(var w=1;w<25;w++){var S=(R=r[w]).high,E=R.low,A=u[w];A<32?(p=S<<A|E>>>32-A,d=E<<A|S>>>32-A):(p=E<<A-32|S>>>64-A,d=S<<A-32|E>>>64-A);var I=l[c[w]];I.high=p,I.low=d}var N=l[0],C=r[0];for(N.high=C.high,N.low=C.low,h=0;h<5;h++)for(y=0;y<5;y++){var R=r[w=h+5*y],T=l[w],x=l[(h+1)%5+5*y],P=l[(h+2)%5+5*y];R.high=T.high^~x.high&P.high,R.low=T.low^~x.low&P.low}R=r[0];var O=f[s];R.high^=O.high,R.low^=O.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],f=0;f<u;f++){var l=a[f],h=l.high,p=l.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new i.init(c,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=o._createHelper(h),e.HmacSHA3=o._createHmacHelper(h)}(Math),n.SHA3)},function(t,e,r){var n;t.exports=(n=r(0),
|
||
/** @preserve
|
||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||
|
||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,i=t[n];t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,p,b,w,S,E,A,I,N,C,R=this._hash.words,T=l.words,x=h.words,P=s.words,O=u.words,B=c.words,k=f.words;for(S=o=R[0],E=a=R[1],A=p=R[2],I=b=R[3],N=w=R[4],r=0;r<80;r+=1)C=o+t[e+P[r]]|0,C+=r<16?d(a,p,b)+T[0]:r<32?y(a,p,b)+T[1]:r<48?g(a,p,b)+T[2]:r<64?v(a,p,b)+T[3]:_(a,p,b)+T[4],C=(C=m(C|=0,B[r]))+w|0,o=w,w=b,b=m(p,10),p=a,a=C,C=S+t[e+O[r]]|0,C+=r<16?_(E,A,I)+x[0]:r<32?v(E,A,I)+x[1]:r<48?g(E,A,I)+x[2]:r<64?y(E,A,I)+x[3]:d(E,A,I)+x[4],C=(C=m(C|=0,k[r]))+N|0,S=N,N=I,I=m(A,10),A=E,E=C;C=R[1]+p+I|0,R[1]=R[2]+b+N|0,R[2]=R[3]+w+S|0,R[3]=R[4]+o+E|0,R[4]=R[0]+a+A|0,R[0]=C},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function d(t,e,r){return t^e^r}function y(t,e,r){return t&e|~t&r}function g(t,e,r){return(t|~e)^r}function v(t,e,r){return t&r|e&~r}function _(t,e,r){return t^(e|~r)}function m(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(p),e.HmacRIPEMD160=o._createHmacHelper(p)}(Math),n.RIPEMD160)},function(t,e,r){var n,i,o,a,s,u,c,f,l;t.exports=(l=r(0),r(11),r(12),i=(n=l).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.SHA1,c=s.HMAC,f=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,n=c.create(r.hasher,t),i=a.create(),o=a.create([1]),s=i.words,u=o.words,f=r.keySize,l=r.iterations;s.length<f;){var h=n.update(e).finalize(o);n.reset();for(var p=h.words,d=p.length,y=h,g=1;g<l;g++){y=n.finalize(y),n.reset();for(var v=y.words,_=0;_<d;_++)p[_]^=v[_]}i.concat(h),u[0]++}return i.sigBytes=4*f,i}}),n.PBKDF2=function(t,e,r){return f.create(r).compute(t,e)},l.PBKDF2)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.mode.CFB=function(){var t=n.lib.BlockCipherMode.extend();function e(t,e,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a<r;a++)t[e+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(t,r){var n=this._cipher,i=n.blockSize;e.call(this,t,r,i,n),this._prevBlock=t.slice(r,r+i)}}),t.Decryptor=t.extend({processBlock:function(t,r){var n=this._cipher,i=n.blockSize,o=t.slice(r,r+i);e.call(this,t,r,i,n),this._prevBlock=o}}),t}(),n.mode.CFB)},function(t,e,r){var n,i,o;t.exports=(o=r(0),r(1),o.mode.CTR=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++)t[e+s]^=a[s]}}),n.Decryptor=i,n),o.mode.CTR)},function(t,e,r){var n;t.exports=(n=r(0),r(1),
|
||
/** @preserve
|
||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||
* derived from CryptoJS.mode.CTR
|
||
* Jan Hruby jhruby.web@gmail.com
|
||
*/
|
||
n.mode.CTRGladman=function(){var t=n.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}else t+=1<<24;return t}var r=t.Encryptor=t.extend({processBlock:function(t,r){var n=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);n.encryptBlock(s,0);for(var u=0;u<i;u++)t[r+u]^=s[u]}});return t.Decryptor=r,t}(),n.mode.CTRGladman)},function(t,e,r){var n,i,o;t.exports=(o=r(0),r(1),o.mode.OFB=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)t[e+a]^=o[a]}}),n.Decryptor=i,n),o.mode.OFB)},function(t,e,r){var n,i;t.exports=(i=r(0),r(1),i.mode.ECB=((n=i.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),n.Decryptor=n.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),n),i.mode.ECB)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,n=4*e,i=n-r%n,o=r+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},n.pad.Ansix923)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},n.pad.Iso10126)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.pad.Iso97971={pad:function(t,e){t.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(t,e)},unpad:function(t){n.pad.ZeroPadding.unpad(t),t.sigBytes--}},n.pad.Iso97971)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;r>=0;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},n.pad.ZeroPadding)},function(t,e,r){var n;t.exports=(n=r(0),r(1),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(t,e,r){var n,i,o,a;t.exports=(a=r(0),r(1),i=(n=a).lib.CipherParams,o=n.enc.Hex,n.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},a.format.Hex)},function(t,e,r){var n;t.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){var t=n,e=t.lib.BlockCipher,r=t.algo,i=[],o=[],a=[],s=[],u=[],c=[],f=[],l=[],h=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,n=0;for(e=0;e<256;e++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var y=t[r],g=t[y],v=t[g],_=257*t[d]^16843008*d;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,u[r]=_<<8|_>>>24,c[r]=_,_=16843009*v^65537*g^257*y^16843008*r,f[d]=_<<24|_>>>8,l[d]=_<<16|_>>>16,h[d]=_<<8|_>>>24,p[d]=_,r?(r=y^t[t[t[v^y]]],n^=t[t[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=e[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=d[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],u=0;u<n;u++){if(a=n-u,u%4)var c=o[a];else c=o[a-4];s[u]=u<4||a<=4?c:f[i[c>>>24]]^l[i[c>>>16&255]]^h[i[c>>>8&255]]^p[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,u,c,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,f,l,h,p,o),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,o,a,s){for(var u=this._nRounds,c=t[e]^r[0],f=t[e+1]^r[1],l=t[e+2]^r[2],h=t[e+3]^r[3],p=4,d=1;d<u;d++){var y=n[c>>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&h]^r[p++],g=n[f>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&c]^r[p++],v=n[l>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&f]^r[p++],_=n[h>>>24]^i[c>>>16&255]^o[f>>>8&255]^a[255&l]^r[p++];c=y,f=g,l=v,h=_}y=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[p++],g=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[p++],v=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^r[p++],_=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[p++],t[e]=y,t[e+1]=g,t[e+2]=v,t[e+3]=_},keySize:8});t.AES=e._createHelper(y)}(),n.AES)},function(t,e,r){var n;t.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){var t=n,e=t.lib,r=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var n=a[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],f=u[o];for(r=0;r<24;r++)c[r/6|0]|=e[(s[r]-1+f)%28]<<31-r%6,c[4+(r/6|0)]|=e[28+(s[r+24]-1+f)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var l=this._invSubKeys=[];for(r=0;r<16;r++)l[r]=i[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^i[u])&f[u])>>>0];this._lBlock=a,this._rBlock=o^s}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function p(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}t.DES=i._createHelper(l);var d=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),n=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(n)),this._des3=l.createEncryptor(r.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(d)}(),n.TripleDES)},function(t,e,r){var n;t.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=e[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var u=n[i];n[i]=n[o],n[o]=u}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,n|=t[(t[e]+t[r])%256]<<24-8*i}return this._i=e,this._j=r,n}t.RC4=e._createHelper(i);var a=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),n.RC4)},function(t,e,r){var n;t.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=[],o=[],a=[],s=r.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=c>>>16|4294901760&f,h=f<<16|65535&c;for(i[0]^=c,i[1]^=l,i[2]^=f,i[3]^=h,i[4]^=c,i[5]^=l,i[6]^=f,i[7]^=h,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),t[e+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),n.Rabbit)},function(t,e,r){var n;t.exports=(n=r(0),r(5),r(6),r(4),r(1),function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=[],o=[],a=[],s=r.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=c>>>16|4294901760&f,h=f<<16|65535&c;for(n[0]^=c,n[1]^=l,n[2]^=f,n[3]^=h,n[4]^=c,n[5]^=l,n[6]^=f,n[7]^=h,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),t[e+n]^=i[n]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],i=65535&n,s=n>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=u^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),n.RabbitLegacy)},function(t,e,r){(function(t){var n;
|
||
/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/(function(){var i="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",l="[object Error]",h="[object Function]",p="[object GeneratorFunction]",d="[object Map]",y="[object Number]",g="[object Object]",v="[object RegExp]",_="[object Set]",m="[object String]",b="[object Symbol]",w="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",N="[object Int8Array]",C="[object Int16Array]",R="[object Int32Array]",T="[object Uint8Array]",x="[object Uint16Array]",P="[object Uint32Array]",O=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|\b__t\)) \+\n'';/g,D=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,j=RegExp(D.source),M=RegExp(U.source),L=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,W=RegExp(H.source),q=/^\s+/,G=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,X=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,tt=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,nt=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,ot=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,st=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",dt="["+ht+"]",yt="["+lt+"]",gt="\\d+",vt="[\\u2700-\\u27bf]",_t="[a-z\\xdf-\\xf6\\xf8-\\xff]",mt="[^\\ud800-\\udfff"+ht+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",St="(?:\\ud83c[\\udde6-\\uddff]){2}",Et="[\\ud800-\\udbff][\\udc00-\\udfff]",At="[A-Z\\xc0-\\xd6\\xd8-\\xde]",It="(?:"+_t+"|"+mt+")",Nt="(?:"+At+"|"+mt+")",Ct="(?:"+yt+"|"+bt+")"+"?",Rt="[\\ufe0e\\ufe0f]?"+Ct+("(?:\\u200d(?:"+[wt,St,Et].join("|")+")[\\ufe0e\\ufe0f]?"+Ct+")*"),Tt="(?:"+[vt,St,Et].join("|")+")"+Rt,xt="(?:"+[wt+yt+"?",yt,St,Et,pt].join("|")+")",Pt=RegExp("['’]","g"),Ot=RegExp(yt,"g"),Bt=RegExp(bt+"(?="+bt+")|"+xt+Rt,"g"),kt=RegExp([At+"?"+_t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[dt,At,"$"].join("|")+")",Nt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[dt,At+It,"$"].join("|")+")",At+"?"+It+"+(?:['’](?:d|ll|m|re|s|t|ve))?",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Tt].join("|"),"g"),Dt=RegExp("[\\u200d\\ud800-\\udfff"+lt+"\\ufe0e\\ufe0f]"),Ut=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Mt=-1,Lt={};Lt[A]=Lt[I]=Lt[N]=Lt[C]=Lt[R]=Lt[T]=Lt["[object Uint8ClampedArray]"]=Lt[x]=Lt[P]=!0,Lt[s]=Lt[u]=Lt[S]=Lt[c]=Lt[E]=Lt[f]=Lt[l]=Lt[h]=Lt[d]=Lt[y]=Lt[g]=Lt[v]=Lt[_]=Lt[m]=Lt[w]=!1;var Ft={};Ft[s]=Ft[u]=Ft[S]=Ft[E]=Ft[c]=Ft[f]=Ft[A]=Ft[I]=Ft[N]=Ft[C]=Ft[R]=Ft[d]=Ft[y]=Ft[g]=Ft[v]=Ft[_]=Ft[m]=Ft[b]=Ft[T]=Ft["[object Uint8ClampedArray]"]=Ft[x]=Ft[P]=!0,Ft[l]=Ft[h]=Ft[w]=!1;var Kt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},zt=parseFloat,Vt=parseInt,$t="object"==typeof global&&global&&global.Object===Object&&global,Ht="object"==typeof self&&self&&self.Object===Object&&self,Wt=$t||Ht||Function("return this")(),qt=e&&!e.nodeType&&e,Gt=qt&&"object"==typeof t&&t&&!t.nodeType&&t,Jt=Gt&&Gt.exports===qt,Yt=Jt&&$t.process,Zt=function(){try{var t=Gt&&Gt.require&&Gt.require("util").types;return t||Yt&&Yt.binding&&Yt.binding("util")}catch(t){}}(),Xt=Zt&&Zt.isArrayBuffer,Qt=Zt&&Zt.isDate,te=Zt&&Zt.isMap,ee=Zt&&Zt.isRegExp,re=Zt&&Zt.isSet,ne=Zt&&Zt.isTypedArray;function ie(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function oe(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function ae(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function se(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function ue(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function ce(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function fe(t,e){return!!(null==t?0:t.length)&&be(t,e,0)>-1}function le(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function he(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function pe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function de(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function ye(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function ge(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var ve=Ae("length");function _e(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function me(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function be(t,e,r){return e==e?function(t,e,r){var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):me(t,Se,r)}function we(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Se(t){return t!=t}function Ee(t,e){var r=null==t?0:t.length;return r?Ce(t,e)/r:NaN}function Ae(t){return function(e){return null==e?void 0:e[t]}}function Ie(t){return function(e){return null==t?void 0:t[e]}}function Ne(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ce(t,e){for(var r,n=-1,i=t.length;++n<i;){var o=e(t[n]);void 0!==o&&(r=void 0===r?o:r+o)}return r}function Re(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Te(t){return t?t.slice(0,qe(t)+1).replace(q,""):t}function xe(t){return function(e){return t(e)}}function Pe(t,e){return he(e,(function(e){return t[e]}))}function Oe(t,e){return t.has(e)}function Be(t,e){for(var r=-1,n=t.length;++r<n&&be(e,t[r],0)>-1;);return r}function ke(t,e){for(var r=t.length;r--&&be(e,t[r],0)>-1;);return r}function De(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Ue=Ie({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=Ie({"&":"&","<":"<",">":">",'"':""","'":"'"});function Me(t){return"\\"+Kt[t]}function Le(t){return Dt.test(t)}function Fe(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Ke(t,e){return function(r){return t(e(r))}}function ze(t,e){for(var r=-1,n=t.length,i=0,a=[];++r<n;){var s=t[r];s!==e&&s!==o||(t[r]=o,a[i++]=r)}return a}function Ve(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function $e(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function He(t){return Le(t)?function(t){var e=Bt.lastIndex=0;for(;Bt.test(t);)++e;return e}(t):ve(t)}function We(t){return Le(t)?function(t){return t.match(Bt)||[]}(t):function(t){return t.split("")}(t)}function qe(t){for(var e=t.length;e--&&G.test(t.charAt(e)););return e}var Ge=Ie({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Je=function t(e){var r,n=(e=null==e?Wt:Je.defaults(Wt.Object(),e,Je.pick(Wt,jt))).Array,G=e.Date,lt=e.Error,ht=e.Function,pt=e.Math,dt=e.Object,yt=e.RegExp,gt=e.String,vt=e.TypeError,_t=n.prototype,mt=ht.prototype,bt=dt.prototype,wt=e["__core-js_shared__"],St=mt.toString,Et=bt.hasOwnProperty,At=0,It=(r=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Nt=bt.toString,Ct=St.call(dt),Rt=Wt._,Tt=yt("^"+St.call(Et).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xt=Jt?e.Buffer:void 0,Bt=e.Symbol,Dt=e.Uint8Array,Kt=xt?xt.allocUnsafe:void 0,$t=Ke(dt.getPrototypeOf,dt),Ht=dt.create,qt=bt.propertyIsEnumerable,Gt=_t.splice,Yt=Bt?Bt.isConcatSpreadable:void 0,Zt=Bt?Bt.iterator:void 0,ve=Bt?Bt.toStringTag:void 0,Ie=function(){try{var t=to(dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ye=e.clearTimeout!==Wt.clearTimeout&&e.clearTimeout,Ze=G&&G.now!==Wt.Date.now&&G.now,Xe=e.setTimeout!==Wt.setTimeout&&e.setTimeout,Qe=pt.ceil,tr=pt.floor,er=dt.getOwnPropertySymbols,rr=xt?xt.isBuffer:void 0,nr=e.isFinite,ir=_t.join,or=Ke(dt.keys,dt),ar=pt.max,sr=pt.min,ur=G.now,cr=e.parseInt,fr=pt.random,lr=_t.reverse,hr=to(e,"DataView"),pr=to(e,"Map"),dr=to(e,"Promise"),yr=to(e,"Set"),gr=to(e,"WeakMap"),vr=to(dt,"create"),_r=gr&&new gr,mr={},br=Ro(hr),wr=Ro(pr),Sr=Ro(dr),Er=Ro(yr),Ar=Ro(gr),Ir=Bt?Bt.prototype:void 0,Nr=Ir?Ir.valueOf:void 0,Cr=Ir?Ir.toString:void 0;function Rr(t){if(Ha(t)&&!ka(t)&&!(t instanceof Or)){if(t instanceof Pr)return t;if(Et.call(t,"__wrapped__"))return To(t)}return new Pr(t)}var Tr=function(){function t(){}return function(e){if(!$a(e))return{};if(Ht)return Ht(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function xr(){}function Pr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Or(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Br(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Dr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ur(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Dr;++e<r;)this.add(t[e])}function jr(t){var e=this.__data__=new kr(t);this.size=e.size}function Mr(t,e){var r=ka(t),n=!r&&Ba(t),i=!r&&!n&&Ma(t),o=!r&&!n&&!i&&Qa(t),a=r||n||i||o,s=a?Re(t.length,gt):[],u=s.length;for(var c in t)!e&&!Et.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||so(c,u))||s.push(c);return s}function Lr(t){var e=t.length;return e?t[jn(0,e-1)]:void 0}function Fr(t,e){return Io(_i(t),Jr(e,0,t.length))}function Kr(t){return Io(_i(t))}function zr(t,e,r){(void 0!==r&&!xa(t[e],r)||void 0===r&&!(e in t))&&qr(t,e,r)}function Vr(t,e,r){var n=t[e];Et.call(t,e)&&xa(n,r)&&(void 0!==r||e in t)||qr(t,e,r)}function $r(t,e){for(var r=t.length;r--;)if(xa(t[r][0],e))return r;return-1}function Hr(t,e,r,n){return tn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function Wr(t,e){return t&&mi(e,ws(e),t)}function qr(t,e,r){"__proto__"==e&&Ie?Ie(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Gr(t,e){for(var r=-1,i=e.length,o=n(i),a=null==t;++r<i;)o[r]=a?void 0:gs(t,e[r]);return o}function Jr(t,e,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==e&&(t=t>=e?t:e)),t}function Yr(t,e,r,n,i,o){var a,u=1&e,l=2&e,w=4&e;if(r&&(a=i?r(t,n,i,o):r(t)),void 0!==a)return a;if(!$a(t))return t;var O=ka(t);if(O){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&Et.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!u)return _i(t,a)}else{var B=no(t),k=B==h||B==p;if(Ma(t))return hi(t,u);if(B==g||B==s||k&&!i){if(a=l||k?{}:oo(t),!u)return l?function(t,e){return mi(t,ro(t),e)}(t,function(t,e){return t&&mi(e,Ss(e),t)}(a,t)):function(t,e){return mi(t,eo(t),e)}(t,Wr(a,t))}else{if(!Ft[B])return i?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case S:return pi(t);case c:case f:return new n(+t);case E:return function(t,e){var r=e?pi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case A:case I:case N:case C:case R:case T:case"[object Uint8ClampedArray]":case x:case P:return di(t,r);case d:return new n;case y:case m:return new n(t);case v:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case _:return new n;case b:return i=t,Nr?dt(Nr.call(i)):{}}var i}(t,B,u)}}o||(o=new jr);var D=o.get(t);if(D)return D;o.set(t,a),Ya(t)?t.forEach((function(n){a.add(Yr(n,e,r,n,t,o))})):Wa(t)&&t.forEach((function(n,i){a.set(i,Yr(n,e,r,i,t,o))}));var U=O?void 0:(w?l?qi:Wi:l?Ss:ws)(t);return ae(U||t,(function(n,i){U&&(n=t[i=n]),Vr(a,i,Yr(n,e,r,i,t,o))})),a}function Zr(t,e,r){var n=r.length;if(null==t)return!n;for(t=dt(t);n--;){var i=r[n],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Xr(t,e,r){if("function"!=typeof t)throw new vt(i);return wo((function(){t.apply(void 0,r)}),e)}function Qr(t,e,r,n){var i=-1,o=fe,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;r&&(e=he(e,xe(r))),n?(o=le,a=!1):e.length>=200&&(o=Oe,a=!1,e=new Ur(e));t:for(;++i<s;){var f=t[i],l=null==r?f:r(f);if(f=n||0!==f?f:0,a&&l==l){for(var h=c;h--;)if(e[h]===l)continue t;u.push(f)}else o(e,l,n)||u.push(f)}return u}Rr.templateSettings={escape:L,evaluate:F,interpolate:K,variable:"",imports:{_:Rr}},Rr.prototype=xr.prototype,Rr.prototype.constructor=Rr,Pr.prototype=Tr(xr.prototype),Pr.prototype.constructor=Pr,Or.prototype=Tr(xr.prototype),Or.prototype.constructor=Or,Br.prototype.clear=function(){this.__data__=vr?vr(null):{},this.size=0},Br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Br.prototype.get=function(t){var e=this.__data__;if(vr){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Et.call(e,t)?e[t]:void 0},Br.prototype.has=function(t){var e=this.__data__;return vr?void 0!==e[t]:Et.call(e,t)},Br.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=vr&&void 0===e?"__lodash_hash_undefined__":e,this},kr.prototype.clear=function(){this.__data__=[],this.size=0},kr.prototype.delete=function(t){var e=this.__data__,r=$r(e,t);return!(r<0)&&(r==e.length-1?e.pop():Gt.call(e,r,1),--this.size,!0)},kr.prototype.get=function(t){var e=this.__data__,r=$r(e,t);return r<0?void 0:e[r][1]},kr.prototype.has=function(t){return $r(this.__data__,t)>-1},kr.prototype.set=function(t,e){var r=this.__data__,n=$r(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(pr||kr),string:new Br}},Dr.prototype.delete=function(t){var e=Xi(this,t).delete(t);return this.size-=e?1:0,e},Dr.prototype.get=function(t){return Xi(this,t).get(t)},Dr.prototype.has=function(t){return Xi(this,t).has(t)},Dr.prototype.set=function(t,e){var r=Xi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Ur.prototype.add=Ur.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ur.prototype.has=function(t){return this.__data__.has(t)},jr.prototype.clear=function(){this.__data__=new kr,this.size=0},jr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},jr.prototype.get=function(t){return this.__data__.get(t)},jr.prototype.has=function(t){return this.__data__.has(t)},jr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof kr){var n=r.__data__;if(!pr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dr(n)}return r.set(t,e),this.size=r.size,this};var tn=Si(cn),en=Si(fn,!0);function rn(t,e){var r=!0;return tn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function nn(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],a=e(o);if(null!=a&&(void 0===s?a==a&&!Xa(a):r(a,s)))var s=a,u=o}return u}function on(t,e){var r=[];return tn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function an(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=ao),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?an(s,e-1,r,n,i):pe(i,s):n||(i[i.length]=s)}return i}var sn=Ei(),un=Ei(!0);function cn(t,e){return t&&sn(t,e,ws)}function fn(t,e){return t&&un(t,e,ws)}function ln(t,e){return ce(e,(function(e){return Ka(t[e])}))}function hn(t,e){for(var r=0,n=(e=ui(e,t)).length;null!=t&&r<n;)t=t[Co(e[r++])];return r&&r==n?t:void 0}function pn(t,e,r){var n=e(t);return ka(t)?n:pe(n,r(t))}function dn(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ve&&ve in dt(t)?function(t){var e=Et.call(t,ve),r=t[ve];try{t[ve]=void 0;var n=!0}catch(t){}var i=Nt.call(t);n&&(e?t[ve]=r:delete t[ve]);return i}(t):function(t){return Nt.call(t)}(t)}function yn(t,e){return t>e}function gn(t,e){return null!=t&&Et.call(t,e)}function vn(t,e){return null!=t&&e in dt(t)}function _n(t,e,r){for(var i=r?le:fe,o=t[0].length,a=t.length,s=a,u=n(a),c=1/0,f=[];s--;){var l=t[s];s&&e&&(l=he(l,xe(e))),c=sr(l.length,c),u[s]=!r&&(e||o>=120&&l.length>=120)?new Ur(s&&l):void 0}l=t[0];var h=-1,p=u[0];t:for(;++h<o&&f.length<c;){var d=l[h],y=e?e(d):d;if(d=r||0!==d?d:0,!(p?Oe(p,y):i(f,y,r))){for(s=a;--s;){var g=u[s];if(!(g?Oe(g,y):i(t[s],y,r)))continue t}p&&p.push(y),f.push(d)}}return f}function mn(t,e,r){var n=null==(t=vo(t,e=ui(e,t)))?t:t[Co(Fo(e))];return null==n?void 0:ie(n,t,r)}function bn(t){return Ha(t)&&dn(t)==s}function wn(t,e,r,n,i){return t===e||(null==t||null==e||!Ha(t)&&!Ha(e)?t!=t&&e!=e:function(t,e,r,n,i,o){var a=ka(t),h=ka(e),p=a?u:no(t),w=h?u:no(e),A=(p=p==s?g:p)==g,I=(w=w==s?g:w)==g,N=p==w;if(N&&Ma(t)){if(!Ma(e))return!1;a=!0,A=!1}if(N&&!A)return o||(o=new jr),a||Qa(t)?$i(t,e,r,n,i,o):function(t,e,r,n,i,o,a){switch(r){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!o(new Dt(t),new Dt(e)));case c:case f:case y:return xa(+t,+e);case l:return t.name==e.name&&t.message==e.message;case v:case m:return t==e+"";case d:var s=Fe;case _:var u=1&n;if(s||(s=Ve),t.size!=e.size&&!u)return!1;var h=a.get(t);if(h)return h==e;n|=2,a.set(t,e);var p=$i(s(t),s(e),n,i,o,a);return a.delete(t),p;case b:if(Nr)return Nr.call(t)==Nr.call(e)}return!1}(t,e,p,r,n,i,o);if(!(1&r)){var C=A&&Et.call(t,"__wrapped__"),R=I&&Et.call(e,"__wrapped__");if(C||R){var T=C?t.value():t,x=R?e.value():e;return o||(o=new jr),i(T,x,r,n,o)}}if(!N)return!1;return o||(o=new jr),function(t,e,r,n,i,o){var a=1&r,s=Wi(t),u=s.length,c=Wi(e).length;if(u!=c&&!a)return!1;var f=u;for(;f--;){var l=s[f];if(!(a?l in e:Et.call(e,l)))return!1}var h=o.get(t),p=o.get(e);if(h&&p)return h==e&&p==t;var d=!0;o.set(t,e),o.set(e,t);var y=a;for(;++f<u;){l=s[f];var g=t[l],v=e[l];if(n)var _=a?n(v,g,l,e,t,o):n(g,v,l,t,e,o);if(!(void 0===_?g===v||i(g,v,r,n,o):_)){d=!1;break}y||(y="constructor"==l)}if(d&&!y){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return o.delete(t),o.delete(e),d}(t,e,r,n,i,o)}(t,e,r,n,wn,i))}function Sn(t,e,r,n){var i=r.length,o=i,a=!n;if(null==t)return!o;for(t=dt(t);i--;){var s=r[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=r[i])[0],c=t[u],f=s[1];if(a&&s[2]){if(void 0===c&&!(u in t))return!1}else{var l=new jr;if(n)var h=n(c,f,u,t,e,l);if(!(void 0===h?wn(f,c,3,n,l):h))return!1}}return!0}function En(t){return!(!$a(t)||(e=t,It&&It in e))&&(Ka(t)?Tt:ot).test(Ro(t));var e}function An(t){return"function"==typeof t?t:null==t?qs:"object"==typeof t?ka(t)?xn(t[0],t[1]):Tn(t):ru(t)}function In(t){if(!ho(t))return or(t);var e=[];for(var r in dt(t))Et.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Nn(t){if(!$a(t))return function(t){var e=[];if(null!=t)for(var r in dt(t))e.push(r);return e}(t);var e=ho(t),r=[];for(var n in t)("constructor"!=n||!e&&Et.call(t,n))&&r.push(n);return r}function Cn(t,e){return t<e}function Rn(t,e){var r=-1,i=Ua(t)?n(t.length):[];return tn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Tn(t){var e=Qi(t);return 1==e.length&&e[0][2]?yo(e[0][0],e[0][1]):function(r){return r===t||Sn(r,t,e)}}function xn(t,e){return co(t)&&po(e)?yo(Co(t),e):function(r){var n=gs(r,t);return void 0===n&&n===e?vs(r,t):wn(e,n,3)}}function Pn(t,e,r,n,i){t!==e&&sn(e,(function(o,a){if(i||(i=new jr),$a(o))!function(t,e,r,n,i,o,a){var s=mo(t,r),u=mo(e,r),c=a.get(u);if(c)return void zr(t,r,c);var f=o?o(s,u,r+"",t,e,a):void 0,l=void 0===f;if(l){var h=ka(u),p=!h&&Ma(u),d=!h&&!p&&Qa(u);f=u,h||p||d?ka(s)?f=s:ja(s)?f=_i(s):p?(l=!1,f=hi(u,!0)):d?(l=!1,f=di(u,!0)):f=[]:Ga(u)||Ba(u)?(f=s,Ba(s)?f=ss(s):$a(s)&&!Ka(s)||(f=oo(u))):l=!1}l&&(a.set(u,f),i(f,u,n,o,a),a.delete(u));zr(t,r,f)}(t,e,a,r,Pn,n,i);else{var s=n?n(mo(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),zr(t,a,s)}}),Ss)}function On(t,e){var r=t.length;if(r)return so(e+=e<0?r:0,r)?t[e]:void 0}function Bn(t,e,r){e=e.length?he(e,(function(t){return ka(t)?function(e){return hn(e,1===t.length?t[0]:t)}:t})):[qs];var n=-1;return e=he(e,xe(Zi())),function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(Rn(t,(function(t,r,i){return{criteria:he(e,(function(e){return e(t)})),index:++n,value:t}})),(function(t,e){return function(t,e,r){var n=-1,i=t.criteria,o=e.criteria,a=i.length,s=r.length;for(;++n<a;){var u=yi(i[n],o[n]);if(u){if(n>=s)return u;var c=r[n];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,r)}))}function kn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],s=hn(t,a);r(s,a)&&zn(o,ui(a,t),s)}return o}function Dn(t,e,r,n){var i=n?we:be,o=-1,a=e.length,s=t;for(t===e&&(e=_i(e)),r&&(s=he(t,xe(r)));++o<a;)for(var u=0,c=e[o],f=r?r(c):c;(u=i(s,f,u,n))>-1;)s!==t&&Gt.call(s,u,1),Gt.call(t,u,1);return t}function Un(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;so(i)?Gt.call(t,i,1):ti(t,i)}}return t}function jn(t,e){return t+tr(fr()*(e-t+1))}function Mn(t,e){var r="";if(!t||e<1||e>9007199254740991)return r;do{e%2&&(r+=t),(e=tr(e/2))&&(t+=t)}while(e);return r}function Ln(t,e){return So(go(t,e,qs),t+"")}function Fn(t){return Lr(xs(t))}function Kn(t,e){var r=xs(t);return Io(r,Jr(e,0,r.length))}function zn(t,e,r,n){if(!$a(t))return t;for(var i=-1,o=(e=ui(e,t)).length,a=o-1,s=t;null!=s&&++i<o;){var u=Co(e[i]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=a){var f=s[u];void 0===(c=n?n(f,u,s):void 0)&&(c=$a(f)?f:so(e[i+1])?[]:{})}Vr(s,u,c),s=s[u]}return t}var Vn=_r?function(t,e){return _r.set(t,e),t}:qs,$n=Ie?function(t,e){return Ie(t,"toString",{configurable:!0,enumerable:!1,value:$s(e),writable:!0})}:qs;function Hn(t){return Io(xs(t))}function Wn(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function qn(t,e){var r;return tn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function Gn(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!Xa(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return Jn(t,e,qs,r)}function Jn(t,e,r,n){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=r(e))!=e,s=null===e,u=Xa(e),c=void 0===e;i<o;){var f=tr((i+o)/2),l=r(t[f]),h=void 0!==l,p=null===l,d=l==l,y=Xa(l);if(a)var g=n||d;else g=c?d&&(n||h):s?d&&h&&(n||!p):u?d&&h&&!p&&(n||!y):!p&&!y&&(n?l<=e:l<e);g?i=f+1:o=f}return sr(o,4294967294)}function Yn(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],s=e?e(a):a;if(!r||!xa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Zn(t){return"number"==typeof t?t:Xa(t)?NaN:+t}function Xn(t){if("string"==typeof t)return t;if(ka(t))return he(t,Xn)+"";if(Xa(t))return Cr?Cr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Qn(t,e,r){var n=-1,i=fe,o=t.length,a=!0,s=[],u=s;if(r)a=!1,i=le;else if(o>=200){var c=e?null:Mi(t);if(c)return Ve(c);a=!1,i=Oe,u=new Ur}else u=e?[]:s;t:for(;++n<o;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,a&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),s.push(f)}else i(u,l,r)||(u!==s&&u.push(l),s.push(f))}return s}function ti(t,e){return null==(t=vo(t,e=ui(e,t)))||delete t[Co(Fo(e))]}function ei(t,e,r,n){return zn(t,e,r(hn(t,e)),n)}function ri(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?Wn(t,n?0:o,n?o+1:i):Wn(t,n?o+1:0,n?i:o)}function ni(t,e){var r=t;return r instanceof Or&&(r=r.value()),de(e,(function(t,e){return e.func.apply(e.thisArg,pe([t],e.args))}),r)}function ii(t,e,r){var i=t.length;if(i<2)return i?Qn(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=Qr(a[o]||s,t[u],e,r));return Qn(an(a,1),e,r)}function oi(t,e,r){for(var n=-1,i=t.length,o=e.length,a={};++n<i;){var s=n<o?e[n]:void 0;r(a,t[n],s)}return a}function ai(t){return ja(t)?t:[]}function si(t){return"function"==typeof t?t:qs}function ui(t,e){return ka(t)?t:co(t,e)?[t]:No(us(t))}var ci=Ln;function fi(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:Wn(t,e,r)}var li=Ye||function(t){return Wt.clearTimeout(t)};function hi(t,e){if(e)return t.slice();var r=t.length,n=Kt?Kt(r):new t.constructor(r);return t.copy(n),n}function pi(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function di(t,e){var r=e?pi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function yi(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,o=Xa(t),a=void 0!==e,s=null===e,u=e==e,c=Xa(e);if(!s&&!c&&!o&&t>e||o&&a&&u&&!s&&!c||n&&a&&u||!r&&u||!i)return 1;if(!n&&!o&&!c&&t<e||c&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!u)return-1}return 0}function gi(t,e,r,i){for(var o=-1,a=t.length,s=r.length,u=-1,c=e.length,f=ar(a-s,0),l=n(c+f),h=!i;++u<c;)l[u]=e[u];for(;++o<s;)(h||o<a)&&(l[r[o]]=t[o]);for(;f--;)l[u++]=t[o++];return l}function vi(t,e,r,i){for(var o=-1,a=t.length,s=-1,u=r.length,c=-1,f=e.length,l=ar(a-u,0),h=n(l+f),p=!i;++o<l;)h[o]=t[o];for(var d=o;++c<f;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+r[s]]=t[o++]);return h}function _i(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function mi(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=n?n(r[s],t[s],s,r,t):void 0;void 0===u&&(u=t[s]),i?qr(r,s,u):Vr(r,s,u)}return r}function bi(t,e){return function(r,n){var i=ka(r)?oe:Hr,o=e?e():{};return i(r,t,Zi(n,2),o)}}function wi(t){return Ln((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=dt(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e}))}function Si(t,e){return function(r,n){if(null==r)return r;if(!Ua(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=dt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Ei(t){return function(e,r,n){for(var i=-1,o=dt(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}function Ai(t){return function(e){var r=Le(e=us(e))?We(e):void 0,n=r?r[0]:e.charAt(0),i=r?fi(r,1).join(""):e.slice(1);return n[t]()+i}}function Ii(t){return function(e){return de(Ks(Bs(e).replace(Pt,"")),t,"")}}function Ni(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Tr(t.prototype),n=t.apply(r,e);return $a(n)?n:r}}function Ci(t){return function(e,r,n){var i=dt(e);if(!Ua(e)){var o=Zi(r,3);e=ws(e),r=function(t){return o(i[t],t,i)}}var a=t(e,r,n);return a>-1?i[o?e[a]:a]:void 0}}function Ri(t){return Hi((function(e){var r=e.length,n=r,o=Pr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new vt(i);if(o&&!s&&"wrapper"==Ji(a))var s=new Pr([],!0)}for(n=s?n:r;++n<r;){var u=Ji(a=e[n]),c="wrapper"==u?Gi(a):void 0;s=c&&fo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Ji(c[0])].apply(s,c[3]):1==a.length&&fo(a)?s[u]():s.thru(a)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&ka(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ti(t,e,r,i,o,a,s,u,c,f){var l=128&e,h=1&e,p=2&e,d=24&e,y=512&e,g=p?void 0:Ni(t);return function v(){for(var _=arguments.length,m=n(_),b=_;b--;)m[b]=arguments[b];if(d)var w=Yi(v),S=De(m,w);if(i&&(m=gi(m,i,o,d)),a&&(m=vi(m,a,s,d)),_-=S,d&&_<f){var E=ze(m,w);return Ui(t,e,Ti,v.placeholder,r,m,E,u,c,f-_)}var A=h?r:this,I=p?A[t]:t;return _=m.length,u?m=_o(m,u):y&&_>1&&m.reverse(),l&&c<_&&(m.length=c),this&&this!==Wt&&this instanceof v&&(I=g||Ni(I)),I.apply(A,m)}}function xi(t,e){return function(r,n){return function(t,e,r,n){return cn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Pi(t,e){return function(r,n){var i;if(void 0===r&&void 0===n)return e;if(void 0!==r&&(i=r),void 0!==n){if(void 0===i)return n;"string"==typeof r||"string"==typeof n?(r=Xn(r),n=Xn(n)):(r=Zn(r),n=Zn(n)),i=t(r,n)}return i}}function Oi(t){return Hi((function(e){return e=he(e,xe(Zi())),Ln((function(r){var n=this;return t(e,(function(t){return ie(t,n,r)}))}))}))}function Bi(t,e){var r=(e=void 0===e?" ":Xn(e)).length;if(r<2)return r?Mn(e,t):e;var n=Mn(e,Qe(t/He(e)));return Le(e)?fi(We(n),0,t).join(""):n.slice(0,t)}function ki(t){return function(e,r,i){return i&&"number"!=typeof i&&uo(e,r,i)&&(r=i=void 0),e=ns(e),void 0===r?(r=e,e=0):r=ns(r),function(t,e,r,i){for(var o=-1,a=ar(Qe((e-t)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=t,t+=r;return s}(e,r,i=void 0===i?e<r?1:-1:ns(i),t)}}function Di(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=as(e),r=as(r)),t(e,r)}}function Ui(t,e,r,n,i,o,a,s,u,c){var f=8&e;e|=f?32:64,4&(e&=~(f?64:32))||(e&=-4);var l=[t,e,i,f?o:void 0,f?a:void 0,f?void 0:o,f?void 0:a,s,u,c],h=r.apply(void 0,l);return fo(t)&&bo(h,l),h.placeholder=n,Eo(h,t,e)}function ji(t){var e=pt[t];return function(t,r){if(t=as(t),(r=null==r?0:sr(is(r),292))&&nr(t)){var n=(us(t)+"e").split("e");return+((n=(us(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Mi=yr&&1/Ve(new yr([,-0]))[1]==1/0?function(t){return new yr(t)}:Xs;function Li(t){return function(e){var r=no(e);return r==d?Fe(e):r==_?$e(e):function(t,e){return he(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Fi(t,e,r,a,s,u,c,f){var l=2&e;if(!l&&"function"!=typeof t)throw new vt(i);var h=a?a.length:0;if(h||(e&=-97,a=s=void 0),c=void 0===c?c:ar(is(c),0),f=void 0===f?f:is(f),h-=s?s.length:0,64&e){var p=a,d=s;a=s=void 0}var y=l?void 0:Gi(t),g=[t,e,r,a,s,p,d,u,c,f];if(y&&function(t,e){var r=t[1],n=e[1],i=r|n,a=i<131,s=128==n&&8==r||128==n&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!a&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?gi(c,u,e[4]):u,t[4]=c?ze(t[3],o):e[4]}(u=e[5])&&(c=t[5],t[5]=c?vi(c,u,e[6]):u,t[6]=c?ze(t[5],o):e[6]);(u=e[7])&&(t[7]=u);128&n&&(t[8]=null==t[8]?e[8]:sr(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,y),t=g[0],e=g[1],r=g[2],a=g[3],s=g[4],!(f=g[9]=void 0===g[9]?l?0:t.length:ar(g[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,r){var i=Ni(t);return function o(){for(var a=arguments.length,s=n(a),u=a,c=Yi(o);u--;)s[u]=arguments[u];var f=a<3&&s[0]!==c&&s[a-1]!==c?[]:ze(s,c);if((a-=f.length)<r)return Ui(t,e,Ti,o.placeholder,void 0,s,f,void 0,void 0,r-a);var l=this&&this!==Wt&&this instanceof o?i:t;return ie(l,this,s)}}(t,e,f):32!=e&&33!=e||s.length?Ti.apply(void 0,g):function(t,e,r,i){var o=1&e,a=Ni(t);return function e(){for(var s=-1,u=arguments.length,c=-1,f=i.length,l=n(f+u),h=this&&this!==Wt&&this instanceof e?a:t;++c<f;)l[c]=i[c];for(;u--;)l[c++]=arguments[++s];return ie(h,o?r:this,l)}}(t,e,r,a);else var v=function(t,e,r){var n=1&e,i=Ni(t);return function e(){var o=this&&this!==Wt&&this instanceof e?i:t;return o.apply(n?r:this,arguments)}}(t,e,r);return Eo((y?Vn:bo)(v,g),t,e)}function Ki(t,e,r,n){return void 0===t||xa(t,bt[r])&&!Et.call(n,r)?e:t}function zi(t,e,r,n,i,o){return $a(t)&&$a(e)&&(o.set(e,t),Pn(t,e,void 0,zi,o),o.delete(e)),t}function Vi(t){return Ga(t)?void 0:t}function $i(t,e,r,n,i,o){var a=1&r,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(t),f=o.get(e);if(c&&f)return c==e&&f==t;var l=-1,h=!0,p=2&r?new Ur:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var d=t[l],y=e[l];if(n)var g=a?n(y,d,l,e,t,o):n(d,y,l,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!ge(e,(function(t,e){if(!Oe(p,e)&&(d===t||i(d,t,r,n,o)))return p.push(e)}))){h=!1;break}}else if(d!==y&&!i(d,y,r,n,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Hi(t){return So(go(t,void 0,Do),t+"")}function Wi(t){return pn(t,ws,eo)}function qi(t){return pn(t,Ss,ro)}var Gi=_r?function(t){return _r.get(t)}:Xs;function Ji(t){for(var e=t.name+"",r=mr[e],n=Et.call(mr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function Yi(t){return(Et.call(Rr,"placeholder")?Rr:t).placeholder}function Zi(){var t=Rr.iteratee||Gs;return t=t===Gs?An:t,arguments.length?t(arguments[0],arguments[1]):t}function Xi(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Qi(t){for(var e=ws(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,po(i)]}return e}function to(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return En(r)?r:void 0}var eo=er?function(t){return null==t?[]:(t=dt(t),ce(er(t),(function(e){return qt.call(t,e)})))}:ou,ro=er?function(t){for(var e=[];t;)pe(e,eo(t)),t=$t(t);return e}:ou,no=dn;function io(t,e,r){for(var n=-1,i=(e=ui(e,t)).length,o=!1;++n<i;){var a=Co(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Va(i)&&so(a,i)&&(ka(t)||Ba(t))}function oo(t){return"function"!=typeof t.constructor||ho(t)?{}:Tr($t(t))}function ao(t){return ka(t)||Ba(t)||!!(Yt&&t&&t[Yt])}function so(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&st.test(t))&&t>-1&&t%1==0&&t<e}function uo(t,e,r){if(!$a(r))return!1;var n=typeof e;return!!("number"==n?Ua(r)&&so(e,r.length):"string"==n&&e in r)&&xa(r[e],t)}function co(t,e){if(ka(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Xa(t))||(V.test(t)||!z.test(t)||null!=e&&t in dt(e))}function fo(t){var e=Ji(t),r=Rr[e];if("function"!=typeof r||!(e in Or.prototype))return!1;if(t===r)return!0;var n=Gi(r);return!!n&&t===n[0]}(hr&&no(new hr(new ArrayBuffer(1)))!=E||pr&&no(new pr)!=d||dr&&"[object Promise]"!=no(dr.resolve())||yr&&no(new yr)!=_||gr&&no(new gr)!=w)&&(no=function(t){var e=dn(t),r=e==g?t.constructor:void 0,n=r?Ro(r):"";if(n)switch(n){case br:return E;case wr:return d;case Sr:return"[object Promise]";case Er:return _;case Ar:return w}return e});var lo=wt?Ka:au;function ho(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function po(t){return t==t&&!$a(t)}function yo(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in dt(r)))}}function go(t,e,r){return e=ar(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=ar(i.length-e,0),s=n(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=n(e+1);++o<e;)u[o]=i[o];return u[e]=r(s),ie(t,this,u)}}function vo(t,e){return e.length<2?t:hn(t,Wn(e,0,-1))}function _o(t,e){for(var r=t.length,n=sr(e.length,r),i=_i(t);n--;){var o=e[n];t[n]=so(o,r)?i[o]:void 0}return t}function mo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var bo=Ao(Vn),wo=Xe||function(t,e){return Wt.setTimeout(t,e)},So=Ao($n);function Eo(t,e,r){var n=e+"";return So(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(J,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return ae(a,(function(r){var n="_."+r[0];e&r[1]&&!fe(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(Y);return e?e[1].split(Z):[]}(n),r)))}function Ao(t){var e=0,r=0;return function(){var n=ur(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Io(t,e){var r=-1,n=t.length,i=n-1;for(e=void 0===e?n:e;++r<e;){var o=jn(r,i),a=t[o];t[o]=t[r],t[r]=a}return t.length=e,t}var No=function(t){var e=Aa(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace($,(function(t,r,n,i){e.push(n?i.replace(tt,"$1"):r||t)})),e}));function Co(t){if("string"==typeof t||Xa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ro(t){if(null!=t){try{return St.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function To(t){if(t instanceof Or)return t.clone();var e=new Pr(t.__wrapped__,t.__chain__);return e.__actions__=_i(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var xo=Ln((function(t,e){return ja(t)?Qr(t,an(e,1,ja,!0)):[]})),Po=Ln((function(t,e){var r=Fo(e);return ja(r)&&(r=void 0),ja(t)?Qr(t,an(e,1,ja,!0),Zi(r,2)):[]})),Oo=Ln((function(t,e){var r=Fo(e);return ja(r)&&(r=void 0),ja(t)?Qr(t,an(e,1,ja,!0),void 0,r):[]}));function Bo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:is(r);return i<0&&(i=ar(n+i,0)),me(t,Zi(e,3),i)}function ko(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n-1;return void 0!==r&&(i=is(r),i=r<0?ar(n+i,0):sr(i,n-1)),me(t,Zi(e,3),i,!0)}function Do(t){return(null==t?0:t.length)?an(t,1):[]}function Uo(t){return t&&t.length?t[0]:void 0}var jo=Ln((function(t){var e=he(t,ai);return e.length&&e[0]===t[0]?_n(e):[]})),Mo=Ln((function(t){var e=Fo(t),r=he(t,ai);return e===Fo(r)?e=void 0:r.pop(),r.length&&r[0]===t[0]?_n(r,Zi(e,2)):[]})),Lo=Ln((function(t){var e=Fo(t),r=he(t,ai);return(e="function"==typeof e?e:void 0)&&r.pop(),r.length&&r[0]===t[0]?_n(r,void 0,e):[]}));function Fo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ko=Ln(zo);function zo(t,e){return t&&t.length&&e&&e.length?Dn(t,e):t}var Vo=Hi((function(t,e){var r=null==t?0:t.length,n=Gr(t,e);return Un(t,he(e,(function(t){return so(t,r)?+t:t})).sort(yi)),n}));function $o(t){return null==t?t:lr.call(t)}var Ho=Ln((function(t){return Qn(an(t,1,ja,!0))})),Wo=Ln((function(t){var e=Fo(t);return ja(e)&&(e=void 0),Qn(an(t,1,ja,!0),Zi(e,2))})),qo=Ln((function(t){var e=Fo(t);return e="function"==typeof e?e:void 0,Qn(an(t,1,ja,!0),void 0,e)}));function Go(t){if(!t||!t.length)return[];var e=0;return t=ce(t,(function(t){if(ja(t))return e=ar(t.length,e),!0})),Re(e,(function(e){return he(t,Ae(e))}))}function Jo(t,e){if(!t||!t.length)return[];var r=Go(t);return null==e?r:he(r,(function(t){return ie(e,void 0,t)}))}var Yo=Ln((function(t,e){return ja(t)?Qr(t,e):[]})),Zo=Ln((function(t){return ii(ce(t,ja))})),Xo=Ln((function(t){var e=Fo(t);return ja(e)&&(e=void 0),ii(ce(t,ja),Zi(e,2))})),Qo=Ln((function(t){var e=Fo(t);return e="function"==typeof e?e:void 0,ii(ce(t,ja),void 0,e)})),ta=Ln(Go);var ea=Ln((function(t){var e=t.length,r=e>1?t[e-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,Jo(t,r)}));function ra(t){var e=Rr(t);return e.__chain__=!0,e}function na(t,e){return e(t)}var ia=Hi((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return Gr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Or&&so(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Pr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var oa=bi((function(t,e,r){Et.call(t,r)?++t[r]:qr(t,r,1)}));var aa=Ci(Bo),sa=Ci(ko);function ua(t,e){return(ka(t)?ae:tn)(t,Zi(e,3))}function ca(t,e){return(ka(t)?se:en)(t,Zi(e,3))}var fa=bi((function(t,e,r){Et.call(t,r)?t[r].push(e):qr(t,r,[e])}));var la=Ln((function(t,e,r){var i=-1,o="function"==typeof e,a=Ua(t)?n(t.length):[];return tn(t,(function(t){a[++i]=o?ie(e,t,r):mn(t,e,r)})),a})),ha=bi((function(t,e,r){qr(t,r,e)}));function pa(t,e){return(ka(t)?he:Rn)(t,Zi(e,3))}var da=bi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var ya=Ln((function(t,e){if(null==t)return[];var r=e.length;return r>1&&uo(t,e[0],e[1])?e=[]:r>2&&uo(e[0],e[1],e[2])&&(e=[e[0]]),Bn(t,an(e,1),[])})),ga=Ze||function(){return Wt.Date.now()};function va(t,e,r){return e=r?void 0:e,Fi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function _a(t,e){var r;if("function"!=typeof e)throw new vt(i);return t=is(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var ma=Ln((function(t,e,r){var n=1;if(r.length){var i=ze(r,Yi(ma));n|=32}return Fi(t,n,e,r,i)})),ba=Ln((function(t,e,r){var n=3;if(r.length){var i=ze(r,Yi(ba));n|=32}return Fi(e,n,t,r,i)}));function wa(t,e,r){var n,o,a,s,u,c,f=0,l=!1,h=!1,p=!0;if("function"!=typeof t)throw new vt(i);function d(e){var r=n,i=o;return n=o=void 0,f=e,s=t.apply(i,r)}function y(t){return f=t,u=wo(v,e),l?d(t):s}function g(t){var r=t-c;return void 0===c||r>=e||r<0||h&&t-f>=a}function v(){var t=ga();if(g(t))return _(t);u=wo(v,function(t){var r=e-(t-c);return h?sr(r,a-(t-f)):r}(t))}function _(t){return u=void 0,p&&n?d(t):(n=o=void 0,s)}function m(){var t=ga(),r=g(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return y(c);if(h)return li(u),u=wo(v,e),d(c)}return void 0===u&&(u=wo(v,e)),s}return e=as(e)||0,$a(r)&&(l=!!r.leading,a=(h="maxWait"in r)?ar(as(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),m.cancel=function(){void 0!==u&&li(u),f=0,n=c=o=u=void 0},m.flush=function(){return void 0===u?s:_(ga())},m}var Sa=Ln((function(t,e){return Xr(t,1,e)})),Ea=Ln((function(t,e,r){return Xr(t,as(e)||0,r)}));function Aa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(i);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Aa.Cache||Dr),r}function Ia(t){if("function"!=typeof t)throw new vt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Aa.Cache=Dr;var Na=ci((function(t,e){var r=(e=1==e.length&&ka(e[0])?he(e[0],xe(Zi())):he(an(e,1),xe(Zi()))).length;return Ln((function(n){for(var i=-1,o=sr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return ie(t,this,n)}))})),Ca=Ln((function(t,e){return Fi(t,32,void 0,e,ze(e,Yi(Ca)))})),Ra=Ln((function(t,e){return Fi(t,64,void 0,e,ze(e,Yi(Ra)))})),Ta=Hi((function(t,e){return Fi(t,256,void 0,void 0,void 0,e)}));function xa(t,e){return t===e||t!=t&&e!=e}var Pa=Di(yn),Oa=Di((function(t,e){return t>=e})),Ba=bn(function(){return arguments}())?bn:function(t){return Ha(t)&&Et.call(t,"callee")&&!qt.call(t,"callee")},ka=n.isArray,Da=Xt?xe(Xt):function(t){return Ha(t)&&dn(t)==S};function Ua(t){return null!=t&&Va(t.length)&&!Ka(t)}function ja(t){return Ha(t)&&Ua(t)}var Ma=rr||au,La=Qt?xe(Qt):function(t){return Ha(t)&&dn(t)==f};function Fa(t){if(!Ha(t))return!1;var e=dn(t);return e==l||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ga(t)}function Ka(t){if(!$a(t))return!1;var e=dn(t);return e==h||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function za(t){return"number"==typeof t&&t==is(t)}function Va(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function $a(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ha(t){return null!=t&&"object"==typeof t}var Wa=te?xe(te):function(t){return Ha(t)&&no(t)==d};function qa(t){return"number"==typeof t||Ha(t)&&dn(t)==y}function Ga(t){if(!Ha(t)||dn(t)!=g)return!1;var e=$t(t);if(null===e)return!0;var r=Et.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&St.call(r)==Ct}var Ja=ee?xe(ee):function(t){return Ha(t)&&dn(t)==v};var Ya=re?xe(re):function(t){return Ha(t)&&no(t)==_};function Za(t){return"string"==typeof t||!ka(t)&&Ha(t)&&dn(t)==m}function Xa(t){return"symbol"==typeof t||Ha(t)&&dn(t)==b}var Qa=ne?xe(ne):function(t){return Ha(t)&&Va(t.length)&&!!Lt[dn(t)]};var ts=Di(Cn),es=Di((function(t,e){return t<=e}));function rs(t){if(!t)return[];if(Ua(t))return Za(t)?We(t):_i(t);if(Zt&&t[Zt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Zt]());var e=no(t);return(e==d?Fe:e==_?Ve:xs)(t)}function ns(t){return t?(t=as(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function is(t){var e=ns(t),r=e%1;return e==e?r?e-r:e:0}function os(t){return t?Jr(is(t),0,4294967295):0}function as(t){if("number"==typeof t)return t;if(Xa(t))return NaN;if($a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Te(t);var r=it.test(t);return r||at.test(t)?Vt(t.slice(2),r?2:8):nt.test(t)?NaN:+t}function ss(t){return mi(t,Ss(t))}function us(t){return null==t?"":Xn(t)}var cs=wi((function(t,e){if(ho(e)||Ua(e))mi(e,ws(e),t);else for(var r in e)Et.call(e,r)&&Vr(t,r,e[r])})),fs=wi((function(t,e){mi(e,Ss(e),t)})),ls=wi((function(t,e,r,n){mi(e,Ss(e),t,n)})),hs=wi((function(t,e,r,n){mi(e,ws(e),t,n)})),ps=Hi(Gr);var ds=Ln((function(t,e){t=dt(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&uo(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],a=Ss(o),s=-1,u=a.length;++s<u;){var c=a[s],f=t[c];(void 0===f||xa(f,bt[c])&&!Et.call(t,c))&&(t[c]=o[c])}return t})),ys=Ln((function(t){return t.push(void 0,zi),ie(As,void 0,t)}));function gs(t,e,r){var n=null==t?void 0:hn(t,e);return void 0===n?r:n}function vs(t,e){return null!=t&&io(t,e,vn)}var _s=xi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=r}),$s(qs)),ms=xi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Et.call(t,e)?t[e].push(r):t[e]=[r]}),Zi),bs=Ln(mn);function ws(t){return Ua(t)?Mr(t):In(t)}function Ss(t){return Ua(t)?Mr(t,!0):Nn(t)}var Es=wi((function(t,e,r){Pn(t,e,r)})),As=wi((function(t,e,r,n){Pn(t,e,r,n)})),Is=Hi((function(t,e){var r={};if(null==t)return r;var n=!1;e=he(e,(function(e){return e=ui(e,t),n||(n=e.length>1),e})),mi(t,qi(t),r),n&&(r=Yr(r,7,Vi));for(var i=e.length;i--;)ti(r,e[i]);return r}));var Ns=Hi((function(t,e){return null==t?{}:function(t,e){return kn(t,e,(function(e,r){return vs(t,r)}))}(t,e)}));function Cs(t,e){if(null==t)return{};var r=he(qi(t),(function(t){return[t]}));return e=Zi(e),kn(t,r,(function(t,r){return e(t,r[0])}))}var Rs=Li(ws),Ts=Li(Ss);function xs(t){return null==t?[]:Pe(t,ws(t))}var Ps=Ii((function(t,e,r){return e=e.toLowerCase(),t+(r?Os(e):e)}));function Os(t){return Fs(us(t).toLowerCase())}function Bs(t){return(t=us(t))&&t.replace(ut,Ue).replace(Ot,"")}var ks=Ii((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ds=Ii((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Us=Ai("toLowerCase");var js=Ii((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var Ms=Ii((function(t,e,r){return t+(r?" ":"")+Fs(e)}));var Ls=Ii((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Fs=Ai("toUpperCase");function Ks(t,e,r){return t=us(t),void 0===(e=r?void 0:e)?function(t){return Ut.test(t)}(t)?function(t){return t.match(kt)||[]}(t):function(t){return t.match(X)||[]}(t):t.match(e)||[]}var zs=Ln((function(t,e){try{return ie(t,void 0,e)}catch(t){return Fa(t)?t:new lt(t)}})),Vs=Hi((function(t,e){return ae(e,(function(e){e=Co(e),qr(t,e,ma(t[e],t))})),t}));function $s(t){return function(){return t}}var Hs=Ri(),Ws=Ri(!0);function qs(t){return t}function Gs(t){return An("function"==typeof t?t:Yr(t,1))}var Js=Ln((function(t,e){return function(r){return mn(r,t,e)}})),Ys=Ln((function(t,e){return function(r){return mn(t,r,e)}}));function Zs(t,e,r){var n=ws(e),i=ln(e,n);null!=r||$a(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=ln(e,ws(e)));var o=!($a(r)&&"chain"in r&&!r.chain),a=Ka(t);return ae(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=_i(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,pe([this.value()],arguments))})})),t}function Xs(){}var Qs=Oi(he),tu=Oi(ue),eu=Oi(ge);function ru(t){return co(t)?Ae(Co(t)):function(t){return function(e){return hn(e,t)}}(t)}var nu=ki(),iu=ki(!0);function ou(){return[]}function au(){return!1}var su=Pi((function(t,e){return t+e}),0),uu=ji("ceil"),cu=Pi((function(t,e){return t/e}),1),fu=ji("floor");var lu,hu=Pi((function(t,e){return t*e}),1),pu=ji("round"),du=Pi((function(t,e){return t-e}),0);return Rr.after=function(t,e){if("function"!=typeof e)throw new vt(i);return t=is(t),function(){if(--t<1)return e.apply(this,arguments)}},Rr.ary=va,Rr.assign=cs,Rr.assignIn=fs,Rr.assignInWith=ls,Rr.assignWith=hs,Rr.at=ps,Rr.before=_a,Rr.bind=ma,Rr.bindAll=Vs,Rr.bindKey=ba,Rr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ka(t)?t:[t]},Rr.chain=ra,Rr.chunk=function(t,e,r){e=(r?uo(t,e,r):void 0===e)?1:ar(is(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=n(Qe(i/e));o<i;)s[a++]=Wn(t,o,o+=e);return s},Rr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Rr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return pe(ka(r)?_i(r):[r],an(e,1))},Rr.cond=function(t){var e=null==t?0:t.length,r=Zi();return t=e?he(t,(function(t){if("function"!=typeof t[1])throw new vt(i);return[r(t[0]),t[1]]})):[],Ln((function(r){for(var n=-1;++n<e;){var i=t[n];if(ie(i[0],this,r))return ie(i[1],this,r)}}))},Rr.conforms=function(t){return function(t){var e=ws(t);return function(r){return Zr(r,t,e)}}(Yr(t,1))},Rr.constant=$s,Rr.countBy=oa,Rr.create=function(t,e){var r=Tr(t);return null==e?r:Wr(r,e)},Rr.curry=function t(e,r,n){var i=Fi(e,8,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=t.placeholder,i},Rr.curryRight=function t(e,r,n){var i=Fi(e,16,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=t.placeholder,i},Rr.debounce=wa,Rr.defaults=ds,Rr.defaultsDeep=ys,Rr.defer=Sa,Rr.delay=Ea,Rr.difference=xo,Rr.differenceBy=Po,Rr.differenceWith=Oo,Rr.drop=function(t,e,r){var n=null==t?0:t.length;return n?Wn(t,(e=r||void 0===e?1:is(e))<0?0:e,n):[]},Rr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?Wn(t,0,(e=n-(e=r||void 0===e?1:is(e)))<0?0:e):[]},Rr.dropRightWhile=function(t,e){return t&&t.length?ri(t,Zi(e,3),!0,!0):[]},Rr.dropWhile=function(t,e){return t&&t.length?ri(t,Zi(e,3),!0):[]},Rr.fill=function(t,e,r,n){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&uo(t,e,r)&&(r=0,n=i),function(t,e,r,n){var i=t.length;for((r=is(r))<0&&(r=-r>i?0:i+r),(n=void 0===n||n>i?i:is(n))<0&&(n+=i),n=r>n?0:os(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Rr.filter=function(t,e){return(ka(t)?ce:on)(t,Zi(e,3))},Rr.flatMap=function(t,e){return an(pa(t,e),1)},Rr.flatMapDeep=function(t,e){return an(pa(t,e),1/0)},Rr.flatMapDepth=function(t,e,r){return r=void 0===r?1:is(r),an(pa(t,e),r)},Rr.flatten=Do,Rr.flattenDeep=function(t){return(null==t?0:t.length)?an(t,1/0):[]},Rr.flattenDepth=function(t,e){return(null==t?0:t.length)?an(t,e=void 0===e?1:is(e)):[]},Rr.flip=function(t){return Fi(t,512)},Rr.flow=Hs,Rr.flowRight=Ws,Rr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Rr.functions=function(t){return null==t?[]:ln(t,ws(t))},Rr.functionsIn=function(t){return null==t?[]:ln(t,Ss(t))},Rr.groupBy=fa,Rr.initial=function(t){return(null==t?0:t.length)?Wn(t,0,-1):[]},Rr.intersection=jo,Rr.intersectionBy=Mo,Rr.intersectionWith=Lo,Rr.invert=_s,Rr.invertBy=ms,Rr.invokeMap=la,Rr.iteratee=Gs,Rr.keyBy=ha,Rr.keys=ws,Rr.keysIn=Ss,Rr.map=pa,Rr.mapKeys=function(t,e){var r={};return e=Zi(e,3),cn(t,(function(t,n,i){qr(r,e(t,n,i),t)})),r},Rr.mapValues=function(t,e){var r={};return e=Zi(e,3),cn(t,(function(t,n,i){qr(r,n,e(t,n,i))})),r},Rr.matches=function(t){return Tn(Yr(t,1))},Rr.matchesProperty=function(t,e){return xn(t,Yr(e,1))},Rr.memoize=Aa,Rr.merge=Es,Rr.mergeWith=As,Rr.method=Js,Rr.methodOf=Ys,Rr.mixin=Zs,Rr.negate=Ia,Rr.nthArg=function(t){return t=is(t),Ln((function(e){return On(e,t)}))},Rr.omit=Is,Rr.omitBy=function(t,e){return Cs(t,Ia(Zi(e)))},Rr.once=function(t){return _a(2,t)},Rr.orderBy=function(t,e,r,n){return null==t?[]:(ka(e)||(e=null==e?[]:[e]),ka(r=n?void 0:r)||(r=null==r?[]:[r]),Bn(t,e,r))},Rr.over=Qs,Rr.overArgs=Na,Rr.overEvery=tu,Rr.overSome=eu,Rr.partial=Ca,Rr.partialRight=Ra,Rr.partition=da,Rr.pick=Ns,Rr.pickBy=Cs,Rr.property=ru,Rr.propertyOf=function(t){return function(e){return null==t?void 0:hn(t,e)}},Rr.pull=Ko,Rr.pullAll=zo,Rr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Dn(t,e,Zi(r,2)):t},Rr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Dn(t,e,void 0,r):t},Rr.pullAt=Vo,Rr.range=nu,Rr.rangeRight=iu,Rr.rearg=Ta,Rr.reject=function(t,e){return(ka(t)?ce:on)(t,Ia(Zi(e,3)))},Rr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=Zi(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return Un(t,i),r},Rr.rest=function(t,e){if("function"!=typeof t)throw new vt(i);return Ln(t,e=void 0===e?e:is(e))},Rr.reverse=$o,Rr.sampleSize=function(t,e,r){return e=(r?uo(t,e,r):void 0===e)?1:is(e),(ka(t)?Fr:Kn)(t,e)},Rr.set=function(t,e,r){return null==t?t:zn(t,e,r)},Rr.setWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:zn(t,e,r,n)},Rr.shuffle=function(t){return(ka(t)?Kr:Hn)(t)},Rr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&uo(t,e,r)?(e=0,r=n):(e=null==e?0:is(e),r=void 0===r?n:is(r)),Wn(t,e,r)):[]},Rr.sortBy=ya,Rr.sortedUniq=function(t){return t&&t.length?Yn(t):[]},Rr.sortedUniqBy=function(t,e){return t&&t.length?Yn(t,Zi(e,2)):[]},Rr.split=function(t,e,r){return r&&"number"!=typeof r&&uo(t,e,r)&&(e=r=void 0),(r=void 0===r?4294967295:r>>>0)?(t=us(t))&&("string"==typeof e||null!=e&&!Ja(e))&&!(e=Xn(e))&&Le(t)?fi(We(t),0,r):t.split(e,r):[]},Rr.spread=function(t,e){if("function"!=typeof t)throw new vt(i);return e=null==e?0:ar(is(e),0),Ln((function(r){var n=r[e],i=fi(r,0,e);return n&&pe(i,n),ie(t,this,i)}))},Rr.tail=function(t){var e=null==t?0:t.length;return e?Wn(t,1,e):[]},Rr.take=function(t,e,r){return t&&t.length?Wn(t,0,(e=r||void 0===e?1:is(e))<0?0:e):[]},Rr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Wn(t,(e=n-(e=r||void 0===e?1:is(e)))<0?0:e,n):[]},Rr.takeRightWhile=function(t,e){return t&&t.length?ri(t,Zi(e,3),!1,!0):[]},Rr.takeWhile=function(t,e){return t&&t.length?ri(t,Zi(e,3)):[]},Rr.tap=function(t,e){return e(t),t},Rr.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new vt(i);return $a(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),wa(t,e,{leading:n,maxWait:e,trailing:o})},Rr.thru=na,Rr.toArray=rs,Rr.toPairs=Rs,Rr.toPairsIn=Ts,Rr.toPath=function(t){return ka(t)?he(t,Co):Xa(t)?[t]:_i(No(us(t)))},Rr.toPlainObject=ss,Rr.transform=function(t,e,r){var n=ka(t),i=n||Ma(t)||Qa(t);if(e=Zi(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:$a(t)&&Ka(o)?Tr($t(t)):{}}return(i?ae:cn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Rr.unary=function(t){return va(t,1)},Rr.union=Ho,Rr.unionBy=Wo,Rr.unionWith=qo,Rr.uniq=function(t){return t&&t.length?Qn(t):[]},Rr.uniqBy=function(t,e){return t&&t.length?Qn(t,Zi(e,2)):[]},Rr.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Qn(t,void 0,e):[]},Rr.unset=function(t,e){return null==t||ti(t,e)},Rr.unzip=Go,Rr.unzipWith=Jo,Rr.update=function(t,e,r){return null==t?t:ei(t,e,si(r))},Rr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:ei(t,e,si(r),n)},Rr.values=xs,Rr.valuesIn=function(t){return null==t?[]:Pe(t,Ss(t))},Rr.without=Yo,Rr.words=Ks,Rr.wrap=function(t,e){return Ca(si(e),t)},Rr.xor=Zo,Rr.xorBy=Xo,Rr.xorWith=Qo,Rr.zip=ta,Rr.zipObject=function(t,e){return oi(t||[],e||[],Vr)},Rr.zipObjectDeep=function(t,e){return oi(t||[],e||[],zn)},Rr.zipWith=ea,Rr.entries=Rs,Rr.entriesIn=Ts,Rr.extend=fs,Rr.extendWith=ls,Zs(Rr,Rr),Rr.add=su,Rr.attempt=zs,Rr.camelCase=Ps,Rr.capitalize=Os,Rr.ceil=uu,Rr.clamp=function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=as(r))==r?r:0),void 0!==e&&(e=(e=as(e))==e?e:0),Jr(as(t),e,r)},Rr.clone=function(t){return Yr(t,4)},Rr.cloneDeep=function(t){return Yr(t,5)},Rr.cloneDeepWith=function(t,e){return Yr(t,5,e="function"==typeof e?e:void 0)},Rr.cloneWith=function(t,e){return Yr(t,4,e="function"==typeof e?e:void 0)},Rr.conformsTo=function(t,e){return null==e||Zr(t,e,ws(e))},Rr.deburr=Bs,Rr.defaultTo=function(t,e){return null==t||t!=t?e:t},Rr.divide=cu,Rr.endsWith=function(t,e,r){t=us(t),e=Xn(e);var n=t.length,i=r=void 0===r?n:Jr(is(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},Rr.eq=xa,Rr.escape=function(t){return(t=us(t))&&M.test(t)?t.replace(U,je):t},Rr.escapeRegExp=function(t){return(t=us(t))&&W.test(t)?t.replace(H,"\\$&"):t},Rr.every=function(t,e,r){var n=ka(t)?ue:rn;return r&&uo(t,e,r)&&(e=void 0),n(t,Zi(e,3))},Rr.find=aa,Rr.findIndex=Bo,Rr.findKey=function(t,e){return _e(t,Zi(e,3),cn)},Rr.findLast=sa,Rr.findLastIndex=ko,Rr.findLastKey=function(t,e){return _e(t,Zi(e,3),fn)},Rr.floor=fu,Rr.forEach=ua,Rr.forEachRight=ca,Rr.forIn=function(t,e){return null==t?t:sn(t,Zi(e,3),Ss)},Rr.forInRight=function(t,e){return null==t?t:un(t,Zi(e,3),Ss)},Rr.forOwn=function(t,e){return t&&cn(t,Zi(e,3))},Rr.forOwnRight=function(t,e){return t&&fn(t,Zi(e,3))},Rr.get=gs,Rr.gt=Pa,Rr.gte=Oa,Rr.has=function(t,e){return null!=t&&io(t,e,gn)},Rr.hasIn=vs,Rr.head=Uo,Rr.identity=qs,Rr.includes=function(t,e,r,n){t=Ua(t)?t:xs(t),r=r&&!n?is(r):0;var i=t.length;return r<0&&(r=ar(i+r,0)),Za(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&be(t,e,r)>-1},Rr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:is(r);return i<0&&(i=ar(n+i,0)),be(t,e,i)},Rr.inRange=function(t,e,r){return e=ns(e),void 0===r?(r=e,e=0):r=ns(r),function(t,e,r){return t>=sr(e,r)&&t<ar(e,r)}(t=as(t),e,r)},Rr.invoke=bs,Rr.isArguments=Ba,Rr.isArray=ka,Rr.isArrayBuffer=Da,Rr.isArrayLike=Ua,Rr.isArrayLikeObject=ja,Rr.isBoolean=function(t){return!0===t||!1===t||Ha(t)&&dn(t)==c},Rr.isBuffer=Ma,Rr.isDate=La,Rr.isElement=function(t){return Ha(t)&&1===t.nodeType&&!Ga(t)},Rr.isEmpty=function(t){if(null==t)return!0;if(Ua(t)&&(ka(t)||"string"==typeof t||"function"==typeof t.splice||Ma(t)||Qa(t)||Ba(t)))return!t.length;var e=no(t);if(e==d||e==_)return!t.size;if(ho(t))return!In(t).length;for(var r in t)if(Et.call(t,r))return!1;return!0},Rr.isEqual=function(t,e){return wn(t,e)},Rr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:void 0)?r(t,e):void 0;return void 0===n?wn(t,e,void 0,r):!!n},Rr.isError=Fa,Rr.isFinite=function(t){return"number"==typeof t&&nr(t)},Rr.isFunction=Ka,Rr.isInteger=za,Rr.isLength=Va,Rr.isMap=Wa,Rr.isMatch=function(t,e){return t===e||Sn(t,e,Qi(e))},Rr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:void 0,Sn(t,e,Qi(e),r)},Rr.isNaN=function(t){return qa(t)&&t!=+t},Rr.isNative=function(t){if(lo(t))throw new lt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return En(t)},Rr.isNil=function(t){return null==t},Rr.isNull=function(t){return null===t},Rr.isNumber=qa,Rr.isObject=$a,Rr.isObjectLike=Ha,Rr.isPlainObject=Ga,Rr.isRegExp=Ja,Rr.isSafeInteger=function(t){return za(t)&&t>=-9007199254740991&&t<=9007199254740991},Rr.isSet=Ya,Rr.isString=Za,Rr.isSymbol=Xa,Rr.isTypedArray=Qa,Rr.isUndefined=function(t){return void 0===t},Rr.isWeakMap=function(t){return Ha(t)&&no(t)==w},Rr.isWeakSet=function(t){return Ha(t)&&"[object WeakSet]"==dn(t)},Rr.join=function(t,e){return null==t?"":ir.call(t,e)},Rr.kebabCase=ks,Rr.last=Fo,Rr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return void 0!==r&&(i=(i=is(r))<0?ar(n+i,0):sr(i,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,i):me(t,Se,i,!0)},Rr.lowerCase=Ds,Rr.lowerFirst=Us,Rr.lt=ts,Rr.lte=es,Rr.max=function(t){return t&&t.length?nn(t,qs,yn):void 0},Rr.maxBy=function(t,e){return t&&t.length?nn(t,Zi(e,2),yn):void 0},Rr.mean=function(t){return Ee(t,qs)},Rr.meanBy=function(t,e){return Ee(t,Zi(e,2))},Rr.min=function(t){return t&&t.length?nn(t,qs,Cn):void 0},Rr.minBy=function(t,e){return t&&t.length?nn(t,Zi(e,2),Cn):void 0},Rr.stubArray=ou,Rr.stubFalse=au,Rr.stubObject=function(){return{}},Rr.stubString=function(){return""},Rr.stubTrue=function(){return!0},Rr.multiply=hu,Rr.nth=function(t,e){return t&&t.length?On(t,is(e)):void 0},Rr.noConflict=function(){return Wt._===this&&(Wt._=Rt),this},Rr.noop=Xs,Rr.now=ga,Rr.pad=function(t,e,r){t=us(t);var n=(e=is(e))?He(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Bi(tr(i),r)+t+Bi(Qe(i),r)},Rr.padEnd=function(t,e,r){t=us(t);var n=(e=is(e))?He(t):0;return e&&n<e?t+Bi(e-n,r):t},Rr.padStart=function(t,e,r){t=us(t);var n=(e=is(e))?He(t):0;return e&&n<e?Bi(e-n,r)+t:t},Rr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),cr(us(t).replace(q,""),e||0)},Rr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&uo(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ns(t),void 0===e?(e=t,t=0):e=ns(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=fr();return sr(t+i*(e-t+zt("1e-"+((i+"").length-1))),e)}return jn(t,e)},Rr.reduce=function(t,e,r){var n=ka(t)?de:Ne,i=arguments.length<3;return n(t,Zi(e,4),r,i,tn)},Rr.reduceRight=function(t,e,r){var n=ka(t)?ye:Ne,i=arguments.length<3;return n(t,Zi(e,4),r,i,en)},Rr.repeat=function(t,e,r){return e=(r?uo(t,e,r):void 0===e)?1:is(e),Mn(us(t),e)},Rr.replace=function(){var t=arguments,e=us(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Rr.result=function(t,e,r){var n=-1,i=(e=ui(e,t)).length;for(i||(i=1,t=void 0);++n<i;){var o=null==t?void 0:t[Co(e[n])];void 0===o&&(n=i,o=r),t=Ka(o)?o.call(t):o}return t},Rr.round=pu,Rr.runInContext=t,Rr.sample=function(t){return(ka(t)?Lr:Fn)(t)},Rr.size=function(t){if(null==t)return 0;if(Ua(t))return Za(t)?He(t):t.length;var e=no(t);return e==d||e==_?t.size:In(t).length},Rr.snakeCase=js,Rr.some=function(t,e,r){var n=ka(t)?ge:qn;return r&&uo(t,e,r)&&(e=void 0),n(t,Zi(e,3))},Rr.sortedIndex=function(t,e){return Gn(t,e)},Rr.sortedIndexBy=function(t,e,r){return Jn(t,e,Zi(r,2))},Rr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=Gn(t,e);if(n<r&&xa(t[n],e))return n}return-1},Rr.sortedLastIndex=function(t,e){return Gn(t,e,!0)},Rr.sortedLastIndexBy=function(t,e,r){return Jn(t,e,Zi(r,2),!0)},Rr.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=Gn(t,e,!0)-1;if(xa(t[r],e))return r}return-1},Rr.startCase=Ms,Rr.startsWith=function(t,e,r){return t=us(t),r=null==r?0:Jr(is(r),0,t.length),e=Xn(e),t.slice(r,r+e.length)==e},Rr.subtract=du,Rr.sum=function(t){return t&&t.length?Ce(t,qs):0},Rr.sumBy=function(t,e){return t&&t.length?Ce(t,Zi(e,2)):0},Rr.template=function(t,e,r){var n=Rr.templateSettings;r&&uo(t,e,r)&&(e=void 0),t=us(t),e=ls({},e,n,Ki);var i,o,a=ls({},e.imports,n.imports,Ki),s=ws(a),u=Pe(a,s),c=0,f=e.interpolate||ct,l="__p += '",h=yt((e.escape||ct).source+"|"+f.source+"|"+(f===K?et:ct).source+"|"+(e.evaluate||ct).source+"|$","g"),p="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Mt+"]")+"\n";t.replace(h,(function(e,r,n,a,s,u){return n||(n=a),l+=t.slice(c,u).replace(ft,Me),r&&(i=!0,l+="' +\n__e("+r+") +\n'"),s&&(o=!0,l+="';\n"+s+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),l+="';\n";var d=Et.call(e,"variable")&&e.variable;if(d){if(Q.test(d))throw new lt("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(o?l.replace(O,""):l).replace(B,"$1").replace(k,"$1;"),l="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var y=zs((function(){return ht(s,p+"return "+l).apply(void 0,u)}));if(y.source=l,Fa(y))throw y;return y},Rr.times=function(t,e){if((t=is(t))<1||t>9007199254740991)return[];var r=4294967295,n=sr(t,4294967295);t-=4294967295;for(var i=Re(n,e=Zi(e));++r<t;)e(r);return i},Rr.toFinite=ns,Rr.toInteger=is,Rr.toLength=os,Rr.toLower=function(t){return us(t).toLowerCase()},Rr.toNumber=as,Rr.toSafeInteger=function(t){return t?Jr(is(t),-9007199254740991,9007199254740991):0===t?t:0},Rr.toString=us,Rr.toUpper=function(t){return us(t).toUpperCase()},Rr.trim=function(t,e,r){if((t=us(t))&&(r||void 0===e))return Te(t);if(!t||!(e=Xn(e)))return t;var n=We(t),i=We(e);return fi(n,Be(n,i),ke(n,i)+1).join("")},Rr.trimEnd=function(t,e,r){if((t=us(t))&&(r||void 0===e))return t.slice(0,qe(t)+1);if(!t||!(e=Xn(e)))return t;var n=We(t);return fi(n,0,ke(n,We(e))+1).join("")},Rr.trimStart=function(t,e,r){if((t=us(t))&&(r||void 0===e))return t.replace(q,"");if(!t||!(e=Xn(e)))return t;var n=We(t);return fi(n,Be(n,We(e))).join("")},Rr.truncate=function(t,e){var r=30,n="...";if($a(e)){var i="separator"in e?e.separator:i;r="length"in e?is(e.length):r,n="omission"in e?Xn(e.omission):n}var o=(t=us(t)).length;if(Le(t)){var a=We(t);o=a.length}if(r>=o)return t;var s=r-He(n);if(s<1)return n;var u=a?fi(a,0,s).join(""):t.slice(0,s);if(void 0===i)return u+n;if(a&&(s+=u.length-s),Ja(i)){if(t.slice(s).search(i)){var c,f=u;for(i.global||(i=yt(i.source,us(rt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var l=c.index;u=u.slice(0,void 0===l?s:l)}}else if(t.indexOf(Xn(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+n},Rr.unescape=function(t){return(t=us(t))&&j.test(t)?t.replace(D,Ge):t},Rr.uniqueId=function(t){var e=++At;return us(t)+e},Rr.upperCase=Ls,Rr.upperFirst=Fs,Rr.each=ua,Rr.eachRight=ca,Rr.first=Uo,Zs(Rr,(lu={},cn(Rr,(function(t,e){Et.call(Rr.prototype,e)||(lu[e]=t)})),lu),{chain:!1}),Rr.VERSION="4.17.21",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Rr[t].placeholder=Rr})),ae(["drop","take"],(function(t,e){Or.prototype[t]=function(r){r=void 0===r?1:ar(is(r),0);var n=this.__filtered__&&!e?new Or(this):this.clone();return n.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},Or.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Or.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Zi(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),ae(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Or.prototype[t]=function(){return this[r](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Or.prototype[t]=function(){return this.__filtered__?new Or(this):this[r](1)}})),Or.prototype.compact=function(){return this.filter(qs)},Or.prototype.find=function(t){return this.filter(t).head()},Or.prototype.findLast=function(t){return this.reverse().find(t)},Or.prototype.invokeMap=Ln((function(t,e){return"function"==typeof t?new Or(this):this.map((function(r){return mn(r,t,e)}))})),Or.prototype.reject=function(t){return this.filter(Ia(Zi(t)))},Or.prototype.slice=function(t,e){t=is(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Or(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==e&&(r=(e=is(e))<0?r.dropRight(-e):r.take(e-t)),r)},Or.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Or.prototype.toArray=function(){return this.take(4294967295)},cn(Or.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=Rr[n?"take"+("last"==e?"Right":""):e],o=n||/^find/.test(e);i&&(Rr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,s=e instanceof Or,u=a[0],c=s||ka(e),f=function(t){var e=i.apply(Rr,pe([t],a));return n&&l?e[0]:e};c&&r&&"function"==typeof u&&1!=u.length&&(s=c=!1);var l=this.__chain__,h=!!this.__actions__.length,p=o&&!l,d=s&&!h;if(!o&&c){e=d?e:new Or(this);var y=t.apply(e,a);return y.__actions__.push({func:na,args:[f],thisArg:void 0}),new Pr(y,l)}return p&&d?t.apply(this,a):(y=this.thru(f),p?n?y.value()[0]:y.value():y)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_t[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Rr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(ka(i)?i:[],t)}return this[r]((function(r){return e.apply(ka(r)?r:[],t)}))}})),cn(Or.prototype,(function(t,e){var r=Rr[e];if(r){var n=r.name+"";Et.call(mr,n)||(mr[n]=[]),mr[n].push({name:e,func:r})}})),mr[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],Or.prototype.clone=function(){var t=new Or(this.__wrapped__);return t.__actions__=_i(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_i(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_i(this.__views__),t},Or.prototype.reverse=function(){if(this.__filtered__){var t=new Or(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Or.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=ka(t),n=e<0,i=r?t.length:0,o=function(t,e,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=sr(e,t+a);break;case"takeRight":t=ar(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,f=this.__iteratees__,l=f.length,h=0,p=sr(u,this.__takeCount__);if(!r||!n&&i==u&&p==u)return ni(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var y=-1,g=t[c+=e];++y<l;){var v=f[y],_=v.iteratee,m=v.type,b=_(g);if(2==m)g=b;else if(!b){if(1==m)continue t;break t}}d[h++]=g}return d},Rr.prototype.at=ia,Rr.prototype.chain=function(){return ra(this)},Rr.prototype.commit=function(){return new Pr(this.value(),this.__chain__)},Rr.prototype.next=function(){void 0===this.__values__&&(this.__values__=rs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Rr.prototype.plant=function(t){for(var e,r=this;r instanceof xr;){var n=To(r);n.__index__=0,n.__values__=void 0,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},Rr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Or){var e=t;return this.__actions__.length&&(e=new Or(this)),(e=e.reverse()).__actions__.push({func:na,args:[$o],thisArg:void 0}),new Pr(e,this.__chain__)}return this.thru($o)},Rr.prototype.toJSON=Rr.prototype.valueOf=Rr.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Rr.prototype.first=Rr.prototype.head,Zt&&(Rr.prototype[Zt]=function(){return this}),Rr}();Wt._=Je,void 0===(n=function(){return Je}.call(e,r,e,t))||(t.exports=n)}).call(this)}).call(this,r(73)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(10),i=r(75),o=r(2),a=r(19);function s(t,e=!1){const r="string"==typeof t?Buffer.from(t):t;if(e)return function(t){const e=a.Certificate.fromPEMs(t);let r="";return e.forEach(t=>{if(t.signatureOID.startsWith("1.2.840.113549.1.1")){const e=u(t);0===r.length?r+=e:r+="_"+e}}),r}(r);return u(a.Certificate.fromPEM(r))}function u(t){const{issuer:e,serialNumber:r}=t,n=e.attributes.reduceRight((t,e)=>{const{shortName:r,value:n}=e;return`${t}${r}=${n},`},"").slice(0,-1),a=new i.default(r,16).toString(10);return o.createHash("md5").update(n+a,"utf8").digest("hex")}e.loadPublicKeyFromPath=function(t){const e=n.readFileSync(t);return a.Certificate.fromPEM(e).publicKeyRaw.toString("base64")},e.loadPublicKey=function(t){const e="string"==typeof t?Buffer.from(t):t;return a.Certificate.fromPEM(e).publicKeyRaw.toString("base64")},e.getSNFromPath=function(t,e=!1){return s(n.readFileSync(t),e)},e.getSN=s},function(t,e,r){"use strict";r.r(e),r.d(e,"BigNumber",(function(){return _}));var n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",u=1e14,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e9;function l(t){var e=0|t;return t>0||t===e?e:e-1}function h(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function p(t,e){var r,n,i=t.c,o=e.c,a=t.s,s=e.s,u=t.e,c=e.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function d(t,e,r,n){if(t<e||t>r||t!==o(t))throw Error(a+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function y(t){var e=t.c.length-1;return l(t.e/14)==e&&t.c[e]%2!=0}function g(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function v(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var _=function t(e){var r,_,m,b,w,S,E,A,I,N=F.prototype={constructor:F,toString:null,valueOf:null},C=new F(1),R=20,T=4,x=-7,P=21,O=-1e7,B=1e7,k=!1,D=1,U=0,j={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function F(t,e){var r,i,a,u,c,f,l,h,p=this;if(!(p instanceof F))return new F(t,e);if(null==e){if(t&&!0===t._isBigNumber)return p.s=t.s,void(!t.c||t.e>B?p.c=p.e=null:t.e<O?p.c=[p.e=0]:(p.e=t.e,p.c=t.c.slice()));if((f="number"==typeof t)&&0*t==0){if(p.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);return void(u>B?p.c=p.e=null:(p.e=u,p.c=[t]))}h=String(t)}else{if(!n.test(h=String(t)))return m(p,h,f);p.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(u=h.indexOf("."))>-1&&(h=h.replace(".","")),(c=h.search(/e/i))>0?(u<0&&(u=c),u+=+h.slice(c+1),h=h.substring(0,c)):u<0&&(u=h.length)}else{if(d(e,2,M.length,"Base"),10==e&&L)return $(p=new F(t),R+p.e+1,T);if(h=String(t),f="number"==typeof t){if(0*t!=0)return m(p,h,f,e);if(p.s=1/t<0?(h=h.slice(1),-1):1,F.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(s+t)}else p.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=M.slice(0,e),u=c=0,l=h.length;c<l;c++)if(r.indexOf(i=h.charAt(c))<0){if("."==i){if(c>u){u=l;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,c=-1,u=0;continue}return m(p,String(t),f,e)}f=!1,(u=(h=_(h,e,10,p.s)).indexOf("."))>-1?h=h.replace(".",""):u=h.length}for(c=0;48===h.charCodeAt(c);c++);for(l=h.length;48===h.charCodeAt(--l););if(h=h.slice(c,++l)){if(l-=c,f&&F.DEBUG&&l>15&&(t>9007199254740991||t!==o(t)))throw Error(s+p.s*t);if((u=u-c-1)>B)p.c=p.e=null;else if(u<O)p.c=[p.e=0];else{if(p.e=u,p.c=[],c=(u+1)%14,u<0&&(c+=14),c<l){for(c&&p.c.push(+h.slice(0,c)),l-=14;c<l;)p.c.push(+h.slice(c,c+=14));c=14-(h=h.slice(c)).length}else c-=l;for(;c--;h+="0");p.c.push(+h)}}else p.c=[p.e=0]}function K(t,e,r,n){var i,o,a,s,u;if(null==r?r=T:d(r,0,8),!t.c)return t.toString();if(i=t.c[0],a=t.e,null==e)u=h(t.c),u=1==n||2==n&&(a<=x||a>=P)?g(u,a):v(u,a,"0");else if(o=(t=$(new F(t),e,r)).e,s=(u=h(t.c)).length,1==n||2==n&&(e<=o||o<=x)){for(;s<e;u+="0",s++);u=g(u,o)}else if(e-=a,u=v(u,o,"0"),o+1>s){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function z(t,e){for(var r,n=1,i=new F(t[0]);n<t.length;n++){if(!(r=new F(t[n])).s){i=r;break}e.call(i,r)&&(i=r)}return i}function V(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+14*r-1)>B?t.c=t.e=null:r<O?t.c=[t.e=0]:(t.e=r,t.c=e),t}function $(t,e,r,n){var a,s,f,l,h,p,d,y=t.c,g=c;if(y){t:{for(a=1,l=y[0];l>=10;l/=10,a++);if((s=e-a)<0)s+=14,f=e,d=(h=y[p=0])/g[a-f-1]%10|0;else if((p=i((s+1)/14))>=y.length){if(!n)break t;for(;y.length<=p;y.push(0));h=d=0,a=1,f=(s%=14)-14+1}else{for(h=l=y[p],a=1;l>=10;l/=10,a++);d=(f=(s%=14)-14+a)<0?0:h/g[a-f-1]%10|0}if(n=n||e<0||null!=y[p+1]||(f<0?h:h%g[a-f-1]),n=r<4?(d||n)&&(0==r||r==(t.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(s>0?f>0?h/g[a-f]:0:y[p-1])%10&1||r==(t.s<0?8:7)),e<1||!y[0])return y.length=0,n?(e-=t.e+1,y[0]=g[(14-e%14)%14],t.e=-e||0):y[0]=t.e=0,t;if(0==s?(y.length=p,l=1,p--):(y.length=p+1,l=g[14-s],y[p]=f>0?o(h/g[a-f]%g[f])*l:0),n)for(;;){if(0==p){for(s=1,f=y[0];f>=10;f/=10,s++);for(f=y[0]+=l,l=1;f>=10;f/=10,l++);s!=l&&(t.e++,y[0]==u&&(y[0]=1));break}if(y[p]+=l,y[p]!=u)break;y[p--]=0,l=1}for(s=y.length;0===y[--s];y.pop());}t.e>B?t.c=t.e=null:t.e<O&&(t.c=[t.e=0])}return t}function H(t){var e,r=t.e;return null===r?t.toString():(e=h(t.c),e=r<=x||r>=P?g(e,r):v(e,r,"0"),t.s<0?"-"+e:e)}return F.clone=t,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(a+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(d(r=t[e],0,f,e),R=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(d(r=t[e],0,8,e),T=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(d(r[0],-f,0,e),d(r[1],0,f,e),x=r[0],P=r[1]):(d(r,-f,f,e),x=-(P=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)d(r[0],-f,-1,e),d(r[1],1,f,e),O=r[0],B=r[1];else{if(d(r,-f,f,e),!r)throw Error(a+e+" cannot be zero: "+r);O=-(B=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(a+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw k=!r,Error(a+"crypto unavailable");k=r}else k=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(d(r=t[e],0,9,e),D=r),t.hasOwnProperty(e="POW_PRECISION")&&(d(r=t[e],0,f,e),U=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(a+e+" not an object: "+r);j=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+e+" invalid: "+r);L="0123456789"==r.slice(0,10),M=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:T,EXPONENTIAL_AT:[x,P],RANGE:[O,B],CRYPTO:k,MODULO_MODE:D,POW_PRECISION:U,FORMAT:j,ALPHABET:M}},F.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!F.DEBUG)return!0;var e,r,n=t.c,i=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-f&&i<=f&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=u||r!==o(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+t)},F.maximum=F.max=function(){return z(arguments,N.lt)},F.minimum=F.min=function(){return z(arguments,N.gt)},F.random=(b=9007199254740992*Math.random()&2097151?function(){return o(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,s,u,l=0,h=[],p=new F(C);if(null==t?t=R:d(t,0,f),s=i(t/14),k)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)(u=131072*e[l]+(e[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[l]=r[0],e[l+1]=r[1]):(h.push(u%1e14),l+=2);l=s/2}else{if(!crypto.randomBytes)throw k=!1,Error(a+"crypto unavailable");for(e=crypto.randomBytes(s*=7);l<s;)(u=281474976710656*(31&e[l])+1099511627776*e[l+1]+4294967296*e[l+2]+16777216*e[l+3]+(e[l+4]<<16)+(e[l+5]<<8)+e[l+6])>=9e15?crypto.randomBytes(7).copy(e,l):(h.push(u%1e14),l+=7);l=s/7}if(!k)for(;l<s;)(u=b())<9e15&&(h[l++]=u%1e14);for(t%=14,(s=h[--l])&&t&&(u=c[14-t],h[l]=o(s/u)*u);0===h[l];h.pop(),l--);if(l<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=14);for(l=1,u=h[0];u>=10;u/=10,l++);l<14&&(n-=14-l)}return p.e=n,p.c=h,p}),F.sum=function(){for(var t=1,e=arguments,r=new F(e[0]);t<e.length;)r=r.plus(e[t++]);return r},_=function(){function t(t,e,r,n){for(var i,o,a=[0],s=0,u=t.length;s<u;){for(o=a.length;o--;a[o]*=e);for(a[0]+=n.indexOf(t.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(e,n,i,o,a){var s,u,c,f,l,p,d,y,g=e.indexOf("."),_=R,m=T;for(g>=0&&(f=U,U=0,e=e.replace(".",""),p=(y=new F(n)).pow(e.length-g),U=f,y.c=t(v(h(p.c),p.e,"0"),10,i,"0123456789"),y.e=y.c.length),c=f=(d=t(e,n,i,a?(s=M,"0123456789"):(s="0123456789",M))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(g<0?--c:(p.c=d,p.e=c,p.s=o,d=(p=r(p,y,_,m,i)).c,l=p.r,c=p.e),g=d[u=c+_+1],f=i/2,l=l||u<0||null!=d[u+1],l=m<4?(null!=g||l)&&(0==m||m==(p.s<0?3:2)):g>f||g==f&&(4==m||l||6==m&&1&d[u-1]||m==(p.s<0?8:7)),u<1||!d[0])e=l?v(s.charAt(1),-_,s.charAt(0)):s.charAt(0);else{if(d.length=u,l)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(g=0,e="";g<=f;e+=s.charAt(d[g++]));e=v(e,c,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%1e7,f=e/1e7|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%1e7)+(n=f*o+(a=t[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+f*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,a,s,c){var f,h,p,d,y,g,v,_,m,b,w,S,E,A,I,N,C,R=n.s==i.s?1:-1,T=n.c,x=i.c;if(!(T&&T[0]&&x&&x[0]))return new F(n.s&&i.s&&(T?!x||T[0]!=x[0]:x)?T&&0==T[0]||!x?0*R:R/0:NaN);for(m=(_=new F(R)).c=[],R=a+(h=n.e-i.e)+1,c||(c=u,h=l(n.e/14)-l(i.e/14),R=R/14|0),p=0;x[p]==(T[p]||0);p++);if(x[p]>(T[p]||0)&&h--,R<0)m.push(1),d=!0;else{for(A=T.length,N=x.length,p=0,R+=2,(y=o(c/(x[0]+1)))>1&&(x=t(x,y,c),T=t(T,y,c),N=x.length,A=T.length),E=N,w=(b=T.slice(0,N)).length;w<N;b[w++]=0);C=x.slice(),C=[0].concat(C),I=x[0],x[1]>=c/2&&I++;do{if(y=0,(f=e(x,b,N,w))<0){if(S=b[0],N!=w&&(S=S*c+(b[1]||0)),(y=o(S/I))>1)for(y>=c&&(y=c-1),v=(g=t(x,y,c)).length,w=b.length;1==e(g,b,v,w);)y--,r(g,N<v?C:x,v,c),v=g.length,f=1;else 0==y&&(f=y=1),v=(g=x.slice()).length;if(v<w&&(g=[0].concat(g)),r(b,g,w,c),w=b.length,-1==f)for(;e(x,b,N,w)<1;)y++,r(b,N<w?C:x,w,c),w=b.length}else 0===f&&(y++,b=[0]);m[p++]=y,b[0]?b[w++]=T[E]||0:(b=[T[E]],w=1)}while((E++<A||null!=b[0])&&R--);d=null!=b[0],m[0]||m.splice(0,1)}if(c==u){for(p=1,R=m[0];R>=10;R/=10,p++);$(_,a+(_.e=p+14*h-1)+1,s,d)}else _.e=h,_.r=+d;return _}}(),w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,E=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,m=function(t,e,r,n){var i,o=r?e:e.replace(I,"");if(A.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(w,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(S,"$1").replace(E,"0.$1")),e!=o))return new F(o,i);if(F.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},N.absoluteValue=N.abs=function(){var t=new F(this);return t.s<0&&(t.s=1),t},N.comparedTo=function(t,e){return p(this,new F(t,e))},N.decimalPlaces=N.dp=function(t,e){var r,n,i,o=this;if(null!=t)return d(t,0,f),null==e?e=T:d(e,0,8),$(new F(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=14*((i=r.length-1)-l(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(t,e){return r(this,new F(t,e),R,T)},N.dividedToIntegerBy=N.idiv=function(t,e){return r(this,new F(t,e),0,1)},N.exponentiatedBy=N.pow=function(t,e){var r,n,s,u,c,f,l,h,p=this;if((t=new F(t)).c&&!t.isInteger())throw Error(a+"Exponent not an integer: "+H(t));if(null!=e&&(e=new F(e)),c=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new F(Math.pow(+H(p),c?2-y(t):+H(t))),e?h.mod(e):h;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new F(NaN);(n=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return u=p.s<0&&y(t)?-0:0,p.e>-1&&(u=1/u),new F(f?1/u:u);U&&(u=i(U/14+2))}for(c?(r=new F(.5),f&&(t.s=1),l=y(t)):l=(s=Math.abs(+H(t)))%2,h=new F(C);;){if(l){if(!(h=h.times(p)).c)break;u?h.c.length>u&&(h.c.length=u):n&&(h=h.mod(e))}if(s){if(0===(s=o(s/2)))break;l=s%2}else if($(t=t.times(r),t.e+1,1),t.e>14)l=y(t);else{if(0===(s=+H(t)))break;l=s%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):n&&(p=p.mod(e))}return n?h:(f&&(h=C.div(h)),e?h.mod(e):u?$(h,U,T,void 0):h)},N.integerValue=function(t){var e=new F(this);return null==t?t=T:d(t,0,8),$(e,e.e+1,t)},N.isEqualTo=N.eq=function(t,e){return 0===p(this,new F(t,e))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(t,e){return p(this,new F(t,e))>0},N.isGreaterThanOrEqualTo=N.gte=function(t,e){return 1===(e=p(this,new F(t,e)))||0===e},N.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},N.isLessThan=N.lt=function(t,e){return p(this,new F(t,e))<0},N.isLessThanOrEqualTo=N.lte=function(t,e){return-1===(e=p(this,new F(t,e)))||0===e},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new F(t,e)).s,!s||!e)return new F(NaN);if(s!=e)return t.s=-e,a.plus(t);var c=a.e/14,f=t.e/14,h=a.c,p=t.c;if(!c||!f){if(!h||!p)return h?(t.s=-e,t):new F(p?a:NaN);if(!h[0]||!p[0])return p[0]?(t.s=-e,t):new F(h[0]?a:3==T?-0:0)}if(c=l(c),f=l(f),h=h.slice(),s=c-f){for((o=s<0)?(s=-s,i=h):(f=c,i=p),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=h.length)<(e=p.length))?s:e,s=e=0;e<n;e++)if(h[e]!=p[e]){o=h[e]<p[e];break}if(o&&(i=h,h=p,p=i,t.s=-t.s),(e=(n=p.length)-(r=h.length))>0)for(;e--;h[r++]=0);for(e=u-1;n>s;){if(h[--n]<p[n]){for(r=n;r&&!h[--r];h[r]=e);--h[r],h[n]+=u}h[n]-=p[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?V(t,h,f):(t.s=3==T?-1:1,t.c=[t.e=0],t)},N.modulo=N.mod=function(t,e){var n,i,o=this;return t=new F(t,e),!o.c||!t.s||t.c&&!t.c[0]?new F(NaN):!t.c||o.c&&!o.c[0]?new F(o):(9==D?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,D),(t=o.minus(n.times(t))).c[0]||1!=D||(t.s=o.s),t)},N.multipliedBy=N.times=function(t,e){var r,n,i,o,a,s,c,f,h,p,d,y,g,v,_=this,m=_.c,b=(t=new F(t,e)).c;if(!(m&&b&&m[0]&&b[0]))return!_.s||!t.s||m&&!m[0]&&!b||b&&!b[0]&&!m?t.c=t.e=t.s=null:(t.s*=_.s,m&&b?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=l(_.e/14)+l(t.e/14),t.s*=_.s,(c=m.length)<(p=b.length)&&(g=m,m=b,b=g,i=c,c=p,p=i),i=c+p,g=[];i--;g.push(0));for(v=u,1e7,i=p;--i>=0;){for(r=0,d=b[i]%1e7,y=b[i]/1e7|0,o=i+(a=c);o>i;)r=((f=d*(f=m[--a]%1e7)+(s=y*f+(h=m[a]/1e7|0)*d)%1e7*1e7+g[o]+r)/v|0)+(s/1e7|0)+y*h,g[o--]=f%v;g[o]=r}return r?++n:g.splice(0,1),V(t,g,n)},N.negated=function(){var t=new F(this);return t.s=-t.s||null,t},N.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new F(t,e)).s,!i||!e)return new F(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/14,a=t.e/14,s=n.c,c=t.c;if(!o||!a){if(!s||!c)return new F(i/0);if(!s[0]||!c[0])return c[0]?t:new F(s[0]?n:0*i)}if(o=l(o),a=l(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=c.length)<0&&(r=c,c=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+c[e]+i)/u|0,s[e]=u===s[e]?0:s[e]%u;return i&&(s=[i].concat(s),++a),V(t,s,a)},N.precision=N.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return d(t,1,f),null==e?e=T:d(e,0,8),$(new F(o),t,e);if(!(r=o.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},N.shiftedBy=function(t){return d(t,-9007199254740991,9007199254740991),this.times("1e"+t)},N.squareRoot=N.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=R+4,p=new F("0.5");if(1!==u||!s||!s[0])return new F(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+H(a)))||u==1/0?(((e=h(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=l((c+1)/2)-(c<0||c%2),n=new F(e=u==1/0?"5e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new F(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=p.times(o.plus(r(a,o,f,1))),h(o.c).slice(0,u)===(e=h(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||($(n,n.e+R+2,1),t=!n.times(n).eq(a));break}if(!i&&($(o,o.e+R+2,0),o.times(o).eq(a))){n=o;break}f+=4,u+=4,i=1}return $(n,n.e+R+1,T,t)},N.toExponential=function(t,e){return null!=t&&(d(t,0,f),t++),K(this,t,e,1)},N.toFixed=function(t,e){return null!=t&&(d(t,0,f),t=t+this.e+1),K(this,t,e)},N.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=j;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var o,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",l=s[0],h=s[1],p=i.s<0,d=p?l.slice(1):l,y=d.length;if(c&&(o=u,u=c,c=o,y-=o),u>0&&y>0){for(o=y%u||u,l=d.substr(0,o);o<y;o+=u)l+=f+d.substr(o,u);c>0&&(l+=f+d.slice(o)),p&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(t){var e,n,i,o,s,u,f,l,p,d,y,g,v=this,_=v.c;if(null!=t&&(!(f=new F(t)).isInteger()&&(f.c||1!==f.s)||f.lt(C)))throw Error(a+"Argument "+(f.isInteger()?"out of range: ":"not an integer: ")+H(f));if(!_)return new F(v);for(e=new F(C),p=n=new F(C),i=l=new F(C),g=h(_),s=e.e=g.length-v.e-1,e.c[0]=c[(u=s%14)<0?14+u:u],t=!t||f.comparedTo(e)>0?s>0?e:p:f,u=B,B=1/0,f=new F(g),l.c[0]=0;d=r(f,e,0,1),1!=(o=n.plus(d.times(i))).comparedTo(t);)n=i,i=o,p=l.plus(d.times(o=p)),l=o,e=f.minus(d.times(o=e)),f=o;return o=r(t.minus(n),i,0,1),l=l.plus(o.times(p)),n=n.plus(o.times(i)),l.s=p.s=v.s,y=r(p,i,s*=2,T).minus(v).abs().comparedTo(r(l,n,s,T).minus(v).abs())<1?[p,i]:[l,n],B=u,y},N.toNumber=function(){return+H(this)},N.toPrecision=function(t,e){return null!=t&&d(t,1,f),K(this,t,e,2)},N.toString=function(t){var e,r=this,n=r.s,i=r.e;return null===i?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=i<=x||i>=P?g(h(r.c),i):v(h(r.c),i,"0"):10===t&&L?e=v(h((r=$(new F(r),R+i+1,T)).c),r.e,"0"):(d(t,2,M.length,"Base"),e=_(v(h(r.c),i,"0"),10,t,n,!0)),n<0&&r.c[0]&&(e="-"+e)),e},N.valueOf=N.toJSON=function(){return H(this)},N._isBigNumber=!0,N[Symbol.toStringTag]="BigNumber",N[Symbol.for("nodejs.util.inspect.custom")]=N.valueOf,null!=e&&F.set(e),F}();e.default=_},function(t,e){t.exports=require("net")},function(t,e,r){!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=e(),s=e([1]),u=e([56129,1]),c=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function y(t,e,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=t[e+o]^r[n+o];return(1&a-1>>>8)-1}function g(t,e,r,n){return y(t,e,r,n,16)}function v(t,e,r,n){return y(t,e,r,n,32)}function _(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,_=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,S=a,E=s,A=u,I=c,N=f,C=l,R=h,T=p,x=d,P=y,O=g,B=v,k=_,D=m,U=b,j=0;j<20;j+=2)w^=(i=(B^=(i=(T^=(i=(I^=(i=w+B|0)<<7|i>>>25)+w|0)<<9|i>>>23)+I|0)<<13|i>>>19)+T|0)<<18|i>>>14,N^=(i=(S^=(i=(k^=(i=(x^=(i=N+S|0)<<7|i>>>25)+N|0)<<9|i>>>23)+x|0)<<13|i>>>19)+k|0)<<18|i>>>14,P^=(i=(C^=(i=(E^=(i=(D^=(i=P+C|0)<<7|i>>>25)+P|0)<<9|i>>>23)+D|0)<<13|i>>>19)+E|0)<<18|i>>>14,U^=(i=(O^=(i=(R^=(i=(A^=(i=U+O|0)<<7|i>>>25)+U|0)<<9|i>>>23)+A|0)<<13|i>>>19)+R|0)<<18|i>>>14,w^=(i=(A^=(i=(E^=(i=(S^=(i=w+A|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+E|0)<<18|i>>>14,N^=(i=(I^=(i=(R^=(i=(C^=(i=N+I|0)<<7|i>>>25)+N|0)<<9|i>>>23)+C|0)<<13|i>>>19)+R|0)<<18|i>>>14,P^=(i=(x^=(i=(T^=(i=(O^=(i=P+x|0)<<7|i>>>25)+P|0)<<9|i>>>23)+O|0)<<13|i>>>19)+T|0)<<18|i>>>14,U^=(i=(D^=(i=(k^=(i=(B^=(i=U+D|0)<<7|i>>>25)+U|0)<<9|i>>>23)+B|0)<<13|i>>>19)+k|0)<<18|i>>>14;w=w+o|0,S=S+a|0,E=E+s|0,A=A+u|0,I=I+c|0,N=N+f|0,C=C+l|0,R=R+h|0,T=T+p|0,x=x+d|0,P=P+y|0,O=O+g|0,B=B+v|0,k=k+_|0,D=D+m|0,U=U+b|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=S>>>0&255,t[5]=S>>>8&255,t[6]=S>>>16&255,t[7]=S>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=I>>>0&255,t[17]=I>>>8&255,t[18]=I>>>16&255,t[19]=I>>>24&255,t[20]=N>>>0&255,t[21]=N>>>8&255,t[22]=N>>>16&255,t[23]=N>>>24&255,t[24]=C>>>0&255,t[25]=C>>>8&255,t[26]=C>>>16&255,t[27]=C>>>24&255,t[28]=R>>>0&255,t[29]=R>>>8&255,t[30]=R>>>16&255,t[31]=R>>>24&255,t[32]=T>>>0&255,t[33]=T>>>8&255,t[34]=T>>>16&255,t[35]=T>>>24&255,t[36]=x>>>0&255,t[37]=x>>>8&255,t[38]=x>>>16&255,t[39]=x>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=O>>>0&255,t[45]=O>>>8&255,t[46]=O>>>16&255,t[47]=O>>>24&255,t[48]=B>>>0&255,t[49]=B>>>8&255,t[50]=B>>>16&255,t[51]=B>>>24&255,t[52]=k>>>0&255,t[53]=k>>>8&255,t[54]=k>>>16&255,t[55]=k>>>24&255,t[56]=D>>>0&255,t[57]=D>>>8&255,t[58]=D>>>16&255,t[59]=D>>>24&255,t[60]=U>>>0&255,t[61]=U>>>8&255,t[62]=U>>>16&255,t[63]=U>>>24&255}(t,e,r,n)}function m(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,_=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(v^=(i=(p^=(i=(c^=(i=o+v|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(a^=(i=(_^=(i=(d^=(i=f+a|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+_|0)<<18|i>>>14,y^=(i=(l^=(i=(s^=(i=(m^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+s|0)<<18|i>>>14,b^=(i=(g^=(i=(h^=(i=(u^=(i=b+g|0)<<7|i>>>25)+b|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,f^=(i=(c^=(i=(h^=(i=(l^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(g^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,b^=(i=(m^=(i=(_^=(i=(v^=(i=b+m|0)<<7|i>>>25)+b|0)<<9|i>>>23)+v|0)<<13|i>>>19)+_|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=f>>>0&255,t[5]=f>>>8&255,t[6]=f>>>16&255,t[7]=f>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=b>>>0&255,t[13]=b>>>8&255,t[14]=b>>>16&255,t[15]=b>>>24&255,t[16]=l>>>0&255,t[17]=l>>>8&255,t[18]=l>>>16&255,t[19]=l>>>24&255,t[20]=h>>>0&255,t[21]=h>>>8&255,t[22]=h>>>16&255,t[23]=h>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(t,e,r,n,i,o,a){var s,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(_(f,c,a,b),u=0;u<64;u++)t[e+u]=r[n+u]^f[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;i-=64,e+=64,n+=64}if(i>0)for(_(f,c,a,b),u=0;u<i;u++)t[e+u]=r[n+u]^f[u];return 0}function S(t,e,r,n,i){var o,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(_(u,s,i,b),a=0;a<64;a++)t[e+a]=u[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(_(u,s,i,b),a=0;a<r;a++)t[e+a]=u[a];return 0}function E(t,e,r,n,i){var o=new Uint8Array(32);m(o,n,i,b);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return S(t,e,r,a,o)}function A(t,e,r,n,i,o,a){var s=new Uint8Array(32);m(s,o,a,b);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return w(t,e,r,n,i,u,s)}var I=function(t){var e,r,n,i,o,a,s,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function N(t,e,r,n,i,o){var a=new I(o);return a.update(r,n,i),a.finish(t,e),0}function C(t,e,r,n,i,o){var a=new Uint8Array(16);return N(a,0,r,n,i,o),g(t,e,a,0)}function R(t,e,r,n,i){var o;if(r<32)return-1;for(A(t,0,e,0,r,n,i),N(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function T(t,e,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(e,16,e,32,r-32,a))return-1;for(A(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function x(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function P(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function O(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function B(t,r){var n,i,o,a=e(),s=e();for(n=0;n<16;n++)s[n]=r[n];for(P(s),P(s),P(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,O(s,a,1-o)}for(n=0;n<16;n++)t[2*n]=255&s[n],t[2*n+1]=s[n]>>8}function k(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,t),B(n,e),v(r,0,n,0)}function D(t){var e=new Uint8Array(32);return B(e,t),1&e[0]}function U(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function j(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function M(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function L(t,e,r){var n,i,o=0,a=0,s=0,u=0,c=0,f=0,l=0,h=0,p=0,d=0,y=0,g=0,v=0,_=0,m=0,b=0,w=0,S=0,E=0,A=0,I=0,N=0,C=0,R=0,T=0,x=0,P=0,O=0,B=0,k=0,D=0,U=r[0],j=r[1],M=r[2],L=r[3],F=r[4],K=r[5],z=r[6],V=r[7],$=r[8],H=r[9],W=r[10],q=r[11],G=r[12],J=r[13],Y=r[14],Z=r[15];o+=(n=e[0])*U,a+=n*j,s+=n*M,u+=n*L,c+=n*F,f+=n*K,l+=n*z,h+=n*V,p+=n*$,d+=n*H,y+=n*W,g+=n*q,v+=n*G,_+=n*J,m+=n*Y,b+=n*Z,a+=(n=e[1])*U,s+=n*j,u+=n*M,c+=n*L,f+=n*F,l+=n*K,h+=n*z,p+=n*V,d+=n*$,y+=n*H,g+=n*W,v+=n*q,_+=n*G,m+=n*J,b+=n*Y,w+=n*Z,s+=(n=e[2])*U,u+=n*j,c+=n*M,f+=n*L,l+=n*F,h+=n*K,p+=n*z,d+=n*V,y+=n*$,g+=n*H,v+=n*W,_+=n*q,m+=n*G,b+=n*J,w+=n*Y,S+=n*Z,u+=(n=e[3])*U,c+=n*j,f+=n*M,l+=n*L,h+=n*F,p+=n*K,d+=n*z,y+=n*V,g+=n*$,v+=n*H,_+=n*W,m+=n*q,b+=n*G,w+=n*J,S+=n*Y,E+=n*Z,c+=(n=e[4])*U,f+=n*j,l+=n*M,h+=n*L,p+=n*F,d+=n*K,y+=n*z,g+=n*V,v+=n*$,_+=n*H,m+=n*W,b+=n*q,w+=n*G,S+=n*J,E+=n*Y,A+=n*Z,f+=(n=e[5])*U,l+=n*j,h+=n*M,p+=n*L,d+=n*F,y+=n*K,g+=n*z,v+=n*V,_+=n*$,m+=n*H,b+=n*W,w+=n*q,S+=n*G,E+=n*J,A+=n*Y,I+=n*Z,l+=(n=e[6])*U,h+=n*j,p+=n*M,d+=n*L,y+=n*F,g+=n*K,v+=n*z,_+=n*V,m+=n*$,b+=n*H,w+=n*W,S+=n*q,E+=n*G,A+=n*J,I+=n*Y,N+=n*Z,h+=(n=e[7])*U,p+=n*j,d+=n*M,y+=n*L,g+=n*F,v+=n*K,_+=n*z,m+=n*V,b+=n*$,w+=n*H,S+=n*W,E+=n*q,A+=n*G,I+=n*J,N+=n*Y,C+=n*Z,p+=(n=e[8])*U,d+=n*j,y+=n*M,g+=n*L,v+=n*F,_+=n*K,m+=n*z,b+=n*V,w+=n*$,S+=n*H,E+=n*W,A+=n*q,I+=n*G,N+=n*J,C+=n*Y,R+=n*Z,d+=(n=e[9])*U,y+=n*j,g+=n*M,v+=n*L,_+=n*F,m+=n*K,b+=n*z,w+=n*V,S+=n*$,E+=n*H,A+=n*W,I+=n*q,N+=n*G,C+=n*J,R+=n*Y,T+=n*Z,y+=(n=e[10])*U,g+=n*j,v+=n*M,_+=n*L,m+=n*F,b+=n*K,w+=n*z,S+=n*V,E+=n*$,A+=n*H,I+=n*W,N+=n*q,C+=n*G,R+=n*J,T+=n*Y,x+=n*Z,g+=(n=e[11])*U,v+=n*j,_+=n*M,m+=n*L,b+=n*F,w+=n*K,S+=n*z,E+=n*V,A+=n*$,I+=n*H,N+=n*W,C+=n*q,R+=n*G,T+=n*J,x+=n*Y,P+=n*Z,v+=(n=e[12])*U,_+=n*j,m+=n*M,b+=n*L,w+=n*F,S+=n*K,E+=n*z,A+=n*V,I+=n*$,N+=n*H,C+=n*W,R+=n*q,T+=n*G,x+=n*J,P+=n*Y,O+=n*Z,_+=(n=e[13])*U,m+=n*j,b+=n*M,w+=n*L,S+=n*F,E+=n*K,A+=n*z,I+=n*V,N+=n*$,C+=n*H,R+=n*W,T+=n*q,x+=n*G,P+=n*J,O+=n*Y,B+=n*Z,m+=(n=e[14])*U,b+=n*j,w+=n*M,S+=n*L,E+=n*F,A+=n*K,I+=n*z,N+=n*V,C+=n*$,R+=n*H,T+=n*W,x+=n*q,P+=n*G,O+=n*J,B+=n*Y,k+=n*Z,b+=(n=e[15])*U,a+=38*(S+=n*M),s+=38*(E+=n*L),u+=38*(A+=n*F),c+=38*(I+=n*K),f+=38*(N+=n*z),l+=38*(C+=n*V),h+=38*(R+=n*$),p+=38*(T+=n*H),d+=38*(x+=n*W),y+=38*(P+=n*q),g+=38*(O+=n*G),v+=38*(B+=n*J),_+=38*(k+=n*Y),m+=38*(D+=n*Z),o=(n=(o+=38*(w+=n*j))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=a,t[2]=s,t[3]=u,t[4]=c,t[5]=f,t[6]=l,t[7]=h,t[8]=p,t[9]=d,t[10]=y,t[11]=g,t[12]=v,t[13]=_,t[14]=m,t[15]=b}function F(t,e){L(t,e,e)}function K(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&L(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function z(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&L(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function V(t,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=e(),f=e(),l=e(),h=e(),p=e(),d=e();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,U(s,n),o=0;o<16;o++)f[o]=s[o],h[o]=c[o]=l[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)O(c,f,i=a[o>>>3]>>>(7&o)&1),O(l,h,i),j(p,c,l),M(c,c,l),j(l,f,h),M(f,f,h),F(h,p),F(d,c),L(c,l,c),L(l,f,p),j(p,c,l),M(c,c,l),F(f,c),M(l,h,d),L(c,l,u),j(c,c,h),L(l,l,c),L(c,h,d),L(h,f,s),F(f,p),O(c,f,i),O(l,h,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=l[o],s[o+48]=f[o],s[o+64]=h[o];var y=s.subarray(32),g=s.subarray(16);return K(y,y),L(g,g,y),B(t,g),0}function $(t,e){return V(t,e,o)}function H(t,e){return n(e,32),$(t,e)}function W(t,e,r){var n=new Uint8Array(32);return V(n,r,e),m(t,i,n,b)}I.prototype.blocks=function(t,e,r){for(var n,i,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w,S=this.fin?0:2048,E=this.h[0],A=this.h[1],I=this.h[2],N=this.h[3],C=this.h[4],R=this.h[5],T=this.h[6],x=this.h[7],P=this.h[8],O=this.h[9],B=this.r[0],k=this.r[1],D=this.r[2],U=this.r[3],j=this.r[4],M=this.r[5],L=this.r[6],F=this.r[7],K=this.r[8],z=this.r[9];r>=16;)h=l=0,h+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*B,h+=(A+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*z),h+=(I+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*K),h+=(N+=8191&(o>>>7|(a=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*F),l=(h+=(C+=8191&(a>>>4|(s=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*L))>>>13,h&=8191,h+=(R+=s>>>1&8191)*(5*M),h+=(T+=8191&(s>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*j),h+=(x+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*U),h+=(P+=8191&(c>>>8|(f=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*D),p=l+=(h+=(O+=f>>>5|S)*(5*k))>>>13,p+=E*k,p+=A*B,p+=I*(5*z),p+=N*(5*K),l=(p+=C*(5*F))>>>13,p&=8191,p+=R*(5*L),p+=T*(5*M),p+=x*(5*j),p+=P*(5*U),l+=(p+=O*(5*D))>>>13,p&=8191,d=l,d+=E*D,d+=A*k,d+=I*B,d+=N*(5*z),l=(d+=C*(5*K))>>>13,d&=8191,d+=R*(5*F),d+=T*(5*L),d+=x*(5*M),d+=P*(5*j),y=l+=(d+=O*(5*U))>>>13,y+=E*U,y+=A*D,y+=I*k,y+=N*B,l=(y+=C*(5*z))>>>13,y&=8191,y+=R*(5*K),y+=T*(5*F),y+=x*(5*L),y+=P*(5*M),g=l+=(y+=O*(5*j))>>>13,g+=E*j,g+=A*U,g+=I*D,g+=N*k,l=(g+=C*B)>>>13,g&=8191,g+=R*(5*z),g+=T*(5*K),g+=x*(5*F),g+=P*(5*L),v=l+=(g+=O*(5*M))>>>13,v+=E*M,v+=A*j,v+=I*U,v+=N*D,l=(v+=C*k)>>>13,v&=8191,v+=R*B,v+=T*(5*z),v+=x*(5*K),v+=P*(5*F),_=l+=(v+=O*(5*L))>>>13,_+=E*L,_+=A*M,_+=I*j,_+=N*U,l=(_+=C*D)>>>13,_&=8191,_+=R*k,_+=T*B,_+=x*(5*z),_+=P*(5*K),m=l+=(_+=O*(5*F))>>>13,m+=E*F,m+=A*L,m+=I*M,m+=N*j,l=(m+=C*U)>>>13,m&=8191,m+=R*D,m+=T*k,m+=x*B,m+=P*(5*z),b=l+=(m+=O*(5*K))>>>13,b+=E*K,b+=A*F,b+=I*L,b+=N*M,l=(b+=C*j)>>>13,b&=8191,b+=R*U,b+=T*D,b+=x*k,b+=P*B,w=l+=(b+=O*(5*z))>>>13,w+=E*z,w+=A*K,w+=I*F,w+=N*L,l=(w+=C*M)>>>13,w&=8191,w+=R*j,w+=T*U,w+=x*D,w+=P*k,E=h=8191&(l=(l=((l+=(w+=O*B)>>>13)<<2)+l|0)+(h&=8191)|0),A=p+=l>>>=13,I=d&=8191,N=y&=8191,C=g&=8191,R=v&=8191,T=_&=8191,x=m&=8191,P=b&=8191,O=w&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=I,this.h[3]=N,this.h[4]=C,this.h[5]=R,this.h[6]=T,this.h[7]=x,this.h[8]=P,this.h[9]=O},I.prototype.finish=function(t,e){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},I.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var q=R,G=T;var J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(t,e,r,n){for(var i,o,a,s,u,c,f,l,h,p,d,y,g,v,_,m,b,w,S,E,A,I,N,C,R,T,x=new Int32Array(16),P=new Int32Array(16),O=t[0],B=t[1],k=t[2],D=t[3],U=t[4],j=t[5],M=t[6],L=t[7],F=e[0],K=e[1],z=e[2],V=e[3],$=e[4],H=e[5],W=e[6],q=e[7],G=0;n>=128;){for(S=0;S<16;S++)E=8*S+G,x[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],P[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(S=0;S<80;S++)if(i=O,o=B,a=k,s=D,u=U,c=j,f=M,L,h=F,p=K,d=z,y=V,g=$,v=H,_=W,q,N=65535&(I=q),C=I>>>16,R=65535&(A=L),T=A>>>16,N+=65535&(I=($>>>14|U<<18)^($>>>18|U<<14)^(U>>>9|$<<23)),C+=I>>>16,R+=65535&(A=(U>>>14|$<<18)^(U>>>18|$<<14)^($>>>9|U<<23)),T+=A>>>16,N+=65535&(I=$&H^~$&W),C+=I>>>16,R+=65535&(A=U&j^~U&M),T+=A>>>16,N+=65535&(I=J[2*S+1]),C+=I>>>16,R+=65535&(A=J[2*S]),T+=A>>>16,A=x[S%16],C+=(I=P[S%16])>>>16,R+=65535&A,T+=A>>>16,R+=(C+=(N+=65535&I)>>>16)>>>16,N=65535&(I=w=65535&N|C<<16),C=I>>>16,R=65535&(A=b=65535&R|(T+=R>>>16)<<16),T=A>>>16,N+=65535&(I=(F>>>28|O<<4)^(O>>>2|F<<30)^(O>>>7|F<<25)),C+=I>>>16,R+=65535&(A=(O>>>28|F<<4)^(F>>>2|O<<30)^(F>>>7|O<<25)),T+=A>>>16,C+=(I=F&K^F&z^K&z)>>>16,R+=65535&(A=O&B^O&k^B&k),T+=A>>>16,l=65535&(R+=(C+=(N+=65535&I)>>>16)>>>16)|(T+=R>>>16)<<16,m=65535&N|C<<16,N=65535&(I=y),C=I>>>16,R=65535&(A=s),T=A>>>16,C+=(I=w)>>>16,R+=65535&(A=b),T+=A>>>16,B=i,k=o,D=a,U=s=65535&(R+=(C+=(N+=65535&I)>>>16)>>>16)|(T+=R>>>16)<<16,j=u,M=c,L=f,O=l,K=h,z=p,V=d,$=y=65535&N|C<<16,H=g,W=v,q=_,F=m,S%16==15)for(E=0;E<16;E++)A=x[E],N=65535&(I=P[E]),C=I>>>16,R=65535&A,T=A>>>16,A=x[(E+9)%16],N+=65535&(I=P[(E+9)%16]),C+=I>>>16,R+=65535&A,T+=A>>>16,b=x[(E+1)%16],N+=65535&(I=((w=P[(E+1)%16])>>>1|b<<31)^(w>>>8|b<<24)^(w>>>7|b<<25)),C+=I>>>16,R+=65535&(A=(b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7),T+=A>>>16,b=x[(E+14)%16],C+=(I=((w=P[(E+14)%16])>>>19|b<<13)^(b>>>29|w<<3)^(w>>>6|b<<26))>>>16,R+=65535&(A=(b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6),T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,x[E]=65535&R|T<<16,P[E]=65535&N|C<<16;N=65535&(I=F),C=I>>>16,R=65535&(A=O),T=A>>>16,A=t[0],C+=(I=e[0])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[0]=O=65535&R|T<<16,e[0]=F=65535&N|C<<16,N=65535&(I=K),C=I>>>16,R=65535&(A=B),T=A>>>16,A=t[1],C+=(I=e[1])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[1]=B=65535&R|T<<16,e[1]=K=65535&N|C<<16,N=65535&(I=z),C=I>>>16,R=65535&(A=k),T=A>>>16,A=t[2],C+=(I=e[2])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[2]=k=65535&R|T<<16,e[2]=z=65535&N|C<<16,N=65535&(I=V),C=I>>>16,R=65535&(A=D),T=A>>>16,A=t[3],C+=(I=e[3])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[3]=D=65535&R|T<<16,e[3]=V=65535&N|C<<16,N=65535&(I=$),C=I>>>16,R=65535&(A=U),T=A>>>16,A=t[4],C+=(I=e[4])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[4]=U=65535&R|T<<16,e[4]=$=65535&N|C<<16,N=65535&(I=H),C=I>>>16,R=65535&(A=j),T=A>>>16,A=t[5],C+=(I=e[5])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[5]=j=65535&R|T<<16,e[5]=H=65535&N|C<<16,N=65535&(I=W),C=I>>>16,R=65535&(A=M),T=A>>>16,A=t[6],C+=(I=e[6])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[6]=M=65535&R|T<<16,e[6]=W=65535&N|C<<16,N=65535&(I=q),C=I>>>16,R=65535&(A=L),T=A>>>16,A=t[7],C+=(I=e[7])>>>16,R+=65535&A,T+=A>>>16,T+=(R+=(C+=(N+=65535&I)>>>16)>>>16)>>>16,t[7]=L=65535&R|T<<16,e[7]=q=65535&N|C<<16,G+=128,n-=128}return n}function Z(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,e,r),r%=128,n=0;n<r;n++)a[n]=e[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,d(a,r-8,s/536870912|0,s<<3),Y(i,o,a,r),n=0;n<8;n++)d(t,8*n,i[n],o[n]);return 0}function X(t,r){var n=e(),i=e(),o=e(),a=e(),s=e(),u=e(),c=e(),l=e(),h=e();M(n,t[1],t[0]),M(h,r[1],r[0]),L(n,n,h),j(i,t[0],t[1]),j(h,r[0],r[1]),L(i,i,h),L(o,t[3],r[3]),L(o,o,f),L(a,t[2],r[2]),j(a,a,a),M(s,i,n),M(u,a,o),j(c,a,o),j(l,i,n),L(t[0],s,u),L(t[1],l,c),L(t[2],c,u),L(t[3],s,l)}function Q(t,e,r){var n;for(n=0;n<4;n++)O(t[n],e[n],r)}function tt(t,r){var n=e(),i=e(),o=e();K(o,r[2]),L(n,r[0],o),L(i,r[1],o),B(t,i),t[31]^=D(n)<<7}function et(t,e,r){var n,i;for(x(t[0],a),x(t[1],s),x(t[2],s),x(t[3],a),i=255;i>=0;--i)Q(t,e,n=r[i/8|0]>>(7&i)&1),X(e,t),X(t,t),Q(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];x(n[0],l),x(n[1],h),x(n[2],s),L(n[3],l,h),et(t,n,r)}function nt(t,r,i){var o,a=new Uint8Array(64),s=[e(),e(),e(),e()];for(i||n(r,32),Z(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,rt(s,a),tt(t,s),o=0;o<32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*it[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function at(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function st(t,r,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),l=[e(),e(),e(),e()];Z(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var h=n+64;for(o=0;o<n;o++)t[64+o]=r[o];for(o=0;o<32;o++)t[32+o]=s[32+o];for(Z(c,t.subarray(32),n+32),at(c),rt(l,c),tt(t,l),o=32;o<64;o++)t[o]=i[o];for(Z(u,t,n+64),at(u),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=c[o];for(o=0;o<32;o++)for(a=0;a<32;a++)f[o+a]+=u[o]*s[a];return ot(t.subarray(32),f),h}function ut(t,r,n,i){var o,u=new Uint8Array(32),f=new Uint8Array(64),l=[e(),e(),e(),e()],h=[e(),e(),e(),e()];if(n<64)return-1;if(function(t,r){var n=e(),i=e(),o=e(),u=e(),f=e(),l=e(),h=e();return x(t[2],s),U(t[1],r),F(o,t[1]),L(u,o,c),M(o,o,t[2]),j(u,t[2],u),F(f,u),F(l,f),L(h,l,f),L(n,h,o),L(n,n,u),z(n,n),L(n,n,o),L(n,n,u),L(n,n,u),L(t[0],n,u),F(i,t[0]),L(i,i,u),k(i,o)&&L(t[0],t[0],p),F(i,t[0]),L(i,i,u),k(i,o)?-1:(D(t[0])===r[31]>>7&&M(t[0],a,t[0]),L(t[3],t[0],t[1]),0)}(h,i))return-1;for(o=0;o<n;o++)t[o]=r[o];for(o=0;o<32;o++)t[o+32]=i[o];if(Z(f,t,n),at(f),et(l,h,f),rt(h,r.subarray(32)),X(l,h),tt(u,l),n-=64,v(r,0,u,0)){for(o=0;o<n;o++)t[o]=0;return-1}for(o=0;o<n;o++)t[o]=r[o+64];return n}function ct(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function ft(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function lt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:m,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:S,crypto_onetimeauth:N,crypto_onetimeauth_verify:C,crypto_verify_16:g,crypto_verify_32:v,crypto_secretbox:R,crypto_secretbox_open:T,crypto_scalarmult:V,crypto_scalarmult_base:$,crypto_box_beforenm:W,crypto_box_afternm:q,crypto_box:function(t,e,r,n,i,o){var a=new Uint8Array(32);return W(a,i,o),q(t,e,r,n,a)},crypto_box_open:function(t,e,r,n,i,o){var a=new Uint8Array(32);return W(a,i,o),G(t,e,r,n,a)},crypto_box_keypair:H,crypto_hash:Z,crypto_sign:st,crypto_sign_keypair:nt,crypto_sign_open:ut,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:c,L:it,pack25519:B,unpack25519:U,M:L,A:j,S:F,Z:M,pow2523:z,add:X,set25519:x,modL:ot,scalarmult:et,scalarbase:rt},t.randomBytes=function(t){var e=new Uint8Array(t);return n(e,t),e},t.secretbox=function(t,e,r){ft(t,e,r),ct(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return R(i,n,n.length,e,r),i.subarray(16)},t.secretbox.open=function(t,e,r){ft(t,e,r),ct(r,e);for(var n=new Uint8Array(16+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+16]=t[o];return n.length<32||0!==T(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(ft(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var r=new Uint8Array(32);return V(r,t,e),r},t.scalarMult.base=function(t){if(ft(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return $(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){ft(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var r=new Uint8Array(32);return W(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(ft(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return $(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(ft(t,e),64!==e.length)throw new Error("bad secret key size");var r=new Uint8Array(64+t.length);return st(r,t,t.length,e),r},t.sign.open=function(t,e){if(ft(t,e),32!==e.length)throw new Error("bad public key size");var r=new Uint8Array(t.length),n=ut(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(ft(t,e,r),64!==e.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,i=new Uint8Array(64+t.length),o=new Uint8Array(64+t.length);for(n=0;n<64;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+64]=t[n];return ut(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(ft(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(ft(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=t[n];return nt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){ft(t);var e=new Uint8Array(64);return Z(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return ft(t,e),0!==t.length&&0!==e.length&&(t.length===e.length&&0===y(t,0,e,0,t.length))},t.setPRNG=function(t){n=t},function(){var e="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(e&&e.getRandomValues){t.setPRNG((function(t,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)t[n]=i[n];lt(i)}))}else(e=r(2))&&e.randomBytes&&t.setPRNG((function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];lt(i)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(9);class i{static parse(t){const e=[],r=t.toString("utf8").split("\n").map(t=>t.trim()).filter(t=>""!==t&&!t.startsWith("#"));for(;r.length>0;)e.push(o(r));if(0===e.length)throw new Error("PEM: no block");return e}constructor(t,e){this.type=t,this.body=e,this.headers=Object.create(null)}get procType(){return this.getHeader("Proc-Type")}getHeader(t){const e=this.headers[t];return null==e?"":e}setHeader(t,e){if(t.includes(":"))throw new Error("pem: cannot encode a header key that contains a colon");if(""===t||""===e)throw new Error("pem: invalid header key or value");this.headers[t]=e}toString(){let t="-----BEGIN "+this.type+"-----\n";const e=Object.keys(this.headers);if(e.length>0){const r=this.procType;""!==r&&(t+=`Proc-Type: ${r}\n`),e.sort();for(const r of e)"Proc-Type"!==r&&(t+=`${r}: ${this.headers[r]}\n`);t+="\n"}const r=this.body.toString("base64");let n=0;for(;n<r.length;)t+=r.slice(n,n+64)+"\n",n+=64;return t+="-----END "+this.type+"-----\n",t}toBuffer(){return Buffer.from(this.toString(),"utf8")}valueOf(){return this.body}toJSON(){return{type:this.type,body:this.body,headers:this.headers}}[n.inspect.custom](t,e){return`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}function o(t){let e=t.shift();if(null==e||!e.startsWith("-----BEGIN ")||!e.endsWith("-----"))throw new Error("pem: invalid BEGIN line");const r=e.slice("-----BEGIN ".length,e.length-"-----".length);if(""===r)throw new Error("pem: invalid type");const n=[];for(e=t.shift();null!=e&&e.includes(": ");){const r=e.split(": ");if(2!==r.length||""===r[0]||""===r[1])throw new Error("pem: invalid Header line");n.push(r),e=t.shift()}let o="";for(;null!=e&&!e.startsWith("-----END ");)o+=e,e=t.shift();if(null==e||e!==`-----END ${r}-----`)throw new Error("pem: invalid END line");const a=new i(r,Buffer.from(o,"base64"));if(""===o||a.body.toString("base64")!==o)throw new Error("pem: invalid base64 body");for(const t of n)a.setHeader(t[0],t[1]);return a}e.PEM=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(9),i=r(22);var o,a;!function(t){t[t.UNIVERSAL=0]="UNIVERSAL",t[t.APPLICATION=64]="APPLICATION",t[t.CONTEXT_SPECIFIC=128]="CONTEXT_SPECIFIC",t[t.PRIVATE=192]="PRIVATE"}(o=e.Class||(e.Class={})),function(t){t[t.NONE=0]="NONE",t[t.BOOLEAN=1]="BOOLEAN",t[t.INTEGER=2]="INTEGER",t[t.BITSTRING=3]="BITSTRING",t[t.OCTETSTRING=4]="OCTETSTRING",t[t.NULL=5]="NULL",t[t.OID=6]="OID",t[t.ENUMERATED=10]="ENUMERATED",t[t.UTF8=12]="UTF8",t[t.SEQUENCE=16]="SEQUENCE",t[t.SET=17]="SET",t[t.NUMERICSTRING=18]="NUMERICSTRING",t[t.PRINTABLESTRING=19]="PRINTABLESTRING",t[t.T61STRING=20]="T61STRING",t[t.IA5STRING=22]="IA5STRING",t[t.UTCTIME=23]="UTCTIME",t[t.GENERALIZEDTIME=24]="GENERALIZEDTIME",t[t.GENERALSTRING=27]="GENERALSTRING"}(a=e.Tag||(e.Tag={}));class s{constructor(t,e){this.buf=t,this.bitLen=e}at(t){if(t<0||t>=this.bitLen||!Number.isInteger(t))return 0;const e=Math.floor(t/8),r=7-t%8;return this.buf[e]>>r&1}rightAlign(){const t=8-this.bitLen%8;if(8===t||0===this.buf.length)return this.buf;const e=Buffer.alloc(this.buf.length);e[0]=this.buf[0]>>t;for(let r=1;r<this.buf.length;r++)e[r]=this.buf[r-1]<<8-t,e[r]|=this.buf[r]>>t;return e}}e.BitString=s;class u{static Bool(t){const e=new u(o.UNIVERSAL,a.BOOLEAN,Buffer.from([t?255:0]));return e._value=t,e}static parseBool(t){if(!(t instanceof Buffer)||1!==t.length)throw new Error("ASN1 syntax error: invalid boolean");switch(t[0]){case 0:return!1;case 255:return!0;default:throw new Error("ASN1 syntax error: invalid boolean")}}static Integer(t){if(t instanceof Buffer){const e=new u(o.UNIVERSAL,a.INTEGER,t);return e._value=t.toString("hex"),e}if(!Number.isSafeInteger(t))throw new Error("ASN1 syntax error: invalid integer");let e;if(t>=-128&&t<128)e=Buffer.alloc(1),e.writeInt8(t,0);else if(t>=-32768&&t<32768)e=Buffer.alloc(2),e.writeIntBE(t,0,2);else if(t>=-8388608&&t<8388608)e=Buffer.alloc(3),e.writeIntBE(t,0,3);else if(t>=-2147483648&&t<2147483648)e=Buffer.alloc(4),e.writeIntBE(t,0,4);else if(t>=-549755813888&&t<549755813888)e=Buffer.alloc(5),e.writeIntBE(t,0,5);else{if(!(t>=-0x800000000000&&t<0x800000000000))throw new Error("ASN1 syntax error: invalid Integer");e=Buffer.alloc(6),e.writeIntBE(t,0,6)}const r=new u(o.UNIVERSAL,a.INTEGER,e);return r._value=t,r}static parseInteger(t){if(!(t instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid Integer");return t.length>6?t.toString("hex"):t.readIntBE(0,t.length)}static parseIntegerNum(t){const e=u.parseInteger(t);if("number"!=typeof e)throw new Error("ASN1 syntax error: invalid Integer number");return e}static parseIntegerStr(t){const e=u.parseInteger(t);return"number"==typeof e?e.toString(16):e}static BitString(t){t instanceof Buffer&&(t=new s(t,8*t.length));const e=8*t.buf.length-t.bitLen,r=Buffer.alloc(t.buf.length+1);return r.writeInt8(e,0),t.buf.copy(r,1),new u(o.UNIVERSAL,a.BITSTRING,r)}static parseBitString(t){if(!(t instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid BitString");const e=t[0];if(e>7||1===t.length&&e>0||0!=(t[t.length-1]&(1<<t[0])-1))throw new Error("ASN1 syntax error: invalid padding bits in BIT STRING");return new s(t.slice(1),8*(t.length-1)-e)}static Null(){const t=new u(o.UNIVERSAL,a.NULL,Buffer.alloc(0));return t._value=null,t}static parseNull(t){if(!(t instanceof Buffer)||0!==t.length)throw new Error("ASN1 syntax error: invalid null");return null}static OID(t){const e=t.split(".");if(0===e.length)throw new Error("ASN1 syntax error: invalid Object Identifier");const r=[];r.push(40*l(e[0])+l(e[1]));const n=[];for(let t=2;t<e.length;++t){let i=l(e[t]);for(n.length=0,n.push(127&i);i>127;)i>>>=7,n.unshift(127&i|128);r.push(...n)}const i=new u(o.UNIVERSAL,a.OID,Buffer.from(r));return i._value=t,i}static parseOID(t){if(!(t instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid OID");let e=Math.floor(t[0]/40)+"."+t[0]%40,r=0;for(let n=1;n<t.length;n++)t[n]>=128?(r+=127&t[n],r<<=7):(e+="."+(r+t[n]),r=0);return e}static UTF8(t){const e=new u(o.UNIVERSAL,a.UTF8,Buffer.from(t,"utf8"));return e._value=t,e}static parseUTF8(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");return t.toString("utf8")}static NumericString(t){if(!c(t))throw new Error("ASN1 syntax error: invalid NumericString");const e=new u(o.UNIVERSAL,a.NUMERICSTRING,Buffer.from(t,"utf8"));return e._value=t,e}static parseNumericString(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");const e=t.toString("utf8");if(!c(e))throw new Error("ASN1 syntax error: invalid NumericString");return e}static PrintableString(t){const e=new u(o.UNIVERSAL,a.PRINTABLESTRING,Buffer.from(t,"utf8"));return e._value=t,e}static parsePrintableString(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");return t.toString("utf8")}static IA5String(t){if(!f(t))throw new Error("ASN1 syntax error: invalid IA5String");const e=new u(o.UNIVERSAL,a.IA5STRING,Buffer.from(t,"utf8"));return e._value=t,e}static parseIA5String(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");const e=t.toString("utf8");if(!f(e))throw new Error("ASN1 syntax error: invalid IA5String");return e}static T61String(t){const e=new u(o.UNIVERSAL,a.T61STRING,Buffer.from(t,"utf8"));return e._value=t,e}static parseT61String(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");return t.toString("utf8")}static GeneralString(t){const e=new u(o.UNIVERSAL,a.GENERALSTRING,Buffer.from(t,"utf8"));return e._value=t,e}static parseGeneralString(t){if(!(t instanceof Buffer))throw new Error("parse ASN1 error: invalid Buffer");return t.toString("utf8")}static UTCTime(t){let e="";const r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(const t of r)t.length<2&&(e+="0"),e+=t;e+="Z";const n=new u(o.UNIVERSAL,a.UTCTIME,Buffer.from(e,"utf8"));return n._value=t,n}static parseUTCTime(t){if(!(t instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid UTC Time");const e=t.toString("utf8"),r=new Date;let n=l(e.substr(0,2));n=n>=50?1900+n:2e3+n;const i=l(e.substr(2,2))-1,o=l(e.substr(4,2)),a=l(e.substr(6,2)),s=l(e.substr(8,2));let u=0,c=0,f="";if(e.length>11&&(c=10,f=e.charAt(c),"+"!==f&&"-"!==f&&(u=l(e.substr(10,2)),c+=2)),r.setUTCFullYear(n,i,o),r.setUTCHours(a,s,u,0),c>0&&(f=e.charAt(c),"+"===f||"-"===f)){let t=60*l(e.substr(c+1,2))+l(e.substr(c+4,2));t*=6e4,"+"===f?r.setTime(+r-t):r.setTime(+r+t)}return r}static GeneralizedTime(t){let e="";const r=[];r.push(""+t.getUTCFullYear()),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(const t of r)t.length<2&&(e+="0"),e+=t;e+="Z";const n=new u(o.UNIVERSAL,a.GENERALIZEDTIME,Buffer.from(e,"utf8"));return n._value=t,n}static parseGeneralizedTime(t){if(!(t instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid Generalized Time");const e=t.toString("utf8"),r=new Date,n=l(e.substr(0,4)),i=l(e.substr(4,2))-1,o=l(e.substr(6,2)),a=l(e.substr(8,2)),s=l(e.substr(10,2)),u=l(e.substr(12,2));let c=0,f=0,h=!1;"Z"===e.charAt(e.length-1)&&(h=!0);const p=e.length-5,d=e.charAt(p);if("+"===d||"-"===d){f=60*l(e.substr(p+1,2))+l(e.substr(p+4,2)),f*=6e4,"+"===d&&(f*=-1),h=!0}return"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14))),h?(r.setUTCFullYear(n,i,o),r.setUTCHours(a,s,u,c),r.setTime(+r+f)):(r.setFullYear(n,i,o),r.setHours(a,s,u,c)),r}static parseTime(t,e){switch(t){case a.UTCTIME:return u.parseUTCTime(e);case a.GENERALIZEDTIME:return u.parseGeneralizedTime(e);default:throw new Error("Invalid ASN1 time tag")}}static Set(t){const e=new u(o.UNIVERSAL,a.SET,Buffer.concat(t.map(t=>t.toDER())));return e._value=t,e}static Seq(t){const e=new u(o.UNIVERSAL,a.SEQUENCE,Buffer.concat(t.map(t=>t.toDER())));return e._value=t,e}static Spec(t,e,r=!0){const n=Array.isArray(e)?Buffer.concat(e.map(t=>t.toDER())):e.toDER();Array.isArray(e)&&(r=!0);const i=new u(o.CONTEXT_SPECIFIC,t,n,r);return i._value=e,i}static fromDER(t,e=!1){return u._fromDER(new i.BufferVisitor(t),e)}static parseDER(t,e,r){const n=u._fromDER(new i.BufferVisitor(t),!1);if(n.class!==e&&n.tag!==r)throw new Error(`invalid ASN.1 DER for class ${e} and tag ${r}`);return n}static parseDERWithTemplate(t,e){const r=u._fromDER(new i.BufferVisitor(t),!0),n={},o=r.validate(e,n);if(null!=o)throw o.data=r,o;return n}static _parseCompound(t,e){const r=[],n=t.length,o=new i.BufferVisitor(t);let a=0;for(;a<n;){const t=o.end;r.push(u._fromDER(o,e)),a+=o.end-t}return r}static _fromDER(t,e){if(!(t.buf instanceof Buffer)||0===t.length)throw new Error("ASN1 syntax error: invalid Generalized Time");t.mustWalk(1,"Too few bytes to read ASN.1 tag.");const r=t.start,n=t.buf[r],i=192&n,o=31&n,s=function(t){t.mustWalk(1,"Too few bytes to read ASN.1 value length.");const e=t.buf[t.start];if(0==(128&e))return e;const r=127&e;return t.mustWalk(r,"Too few bytes to read ASN.1 value length."),t.buf.readUIntBE(t.start,r)}(t);if(t.mustHas(s),0!==s&&o===a.NULL)throw new Error("invalid value length or NULL tag.");t.mustWalk(s);const c=32==(32&n),f=new u(i,o,t.buf.slice(t.start,t.end),c);return c&&e&&(f._value=u._parseCompound(f.bytes,e)),f._der=t.buf.slice(r,t.end),f}constructor(t,e,r,n=!1){this.class=t,this.tag=e,this.bytes=r,this.isCompound=n||e===a.SEQUENCE||e===a.SET,this._value=void 0,this._der=null}get value(){return void 0===this._value&&(this._value=this.valueOf()),this._value}get DER(){return null==this._der&&(this._der=this.toDER()),this._der}mustCompound(t="asn1 object value is not compound"){if(!this.isCompound||!Array.isArray(this.value)){const e=new Error(t);throw e.data=this.toJSON(),e}return this.value}equals(t){return t instanceof u&&(this.class===t.class&&this.tag===t.tag&&this.isCompound===t.isCompound&&!!this.bytes.equals(t.bytes))}toDER(){let t=this.class|this.tag;this.isCompound&&(t|=32);const e=function(t){if(t<=127)return 0;if(t<=255)return 1;if(t<=65535)return 2;if(t<=16777215)return 3;if(t<=4294967295)return 4;if(t<=0xffffffffff)return 5;if(t<=0xffffffffffff)return 6;throw new Error("invalid value length")}(this.bytes.length),r=Buffer.allocUnsafe(2+e+this.bytes.length);return r.writeInt8(t,0),0===e?(r.writeUInt8(this.bytes.length,1),this.bytes.copy(r,2)):(r.writeUInt8(128|e,1),r.writeUIntBE(this.bytes.length,2,e),this.bytes.copy(r,2+e)),r}valueOf(){if(this.isCompound)return u._parseCompound(this.bytes,!1);if(this.class!==o.UNIVERSAL)return this.bytes;switch(this.tag){case a.BOOLEAN:return u.parseBool(this.bytes);case a.INTEGER:return u.parseInteger(this.bytes);case a.BITSTRING:return u.parseBitString(this.bytes);case a.NULL:return u.parseNull(this.bytes);case a.OID:return u.parseOID(this.bytes);case a.UTF8:return u.parseUTF8(this.bytes);case a.NUMERICSTRING:return u.parseNumericString(this.bytes);case a.PRINTABLESTRING:return u.parsePrintableString(this.bytes);case a.T61STRING:return u.parseT61String(this.bytes);case a.IA5STRING:return u.parseIA5String(this.bytes);case a.GENERALSTRING:return u.parseGeneralString(this.bytes);case a.UTCTIME:return u.parseUTCTime(this.bytes);case a.GENERALIZEDTIME:return u.parseGeneralizedTime(this.bytes);default:return this.bytes}}validate(t,e={}){if(this.class!==t.class)return new Error(`ASN.1 object validate failure for ${t.name} : error class ${o[this.class]}`);if(!(Array.isArray(t.tag)?t.tag:[t.tag]).includes(this.tag))return new Error(`ASN.1 object validate failure for ${t.name}: error tag ${a[this.tag]}`);if(null!=t.capture&&(e[t.capture]=this),Array.isArray(t.value)){const r=this.mustCompound(t.name+" need compound ASN1 value");for(let n=0,i=0;n<t.value.length;n++)if(null!=r[i]){const o=r[i].validate(t.value[n],e);if(null==o)i++;else if(!0!==t.value[n].optional)return o}else if(!0!==t.value[n].optional)return new Error(`ASN.1 object validate failure for ${t.value[n].name}: not exists`)}else if(null!=t.value){const r=this.tag===a.BITSTRING?this.bytes.slice(1):this.bytes;return u.fromDER(r).validate(t.value,e)}return null}toJSON(){let t=this.value;return Array.isArray(t)&&(t=t.map(t=>t.toJSON())),{class:o[this.class],tag:this.class===o.UNIVERSAL?a[this.tag]:this.tag,value:t}}[n.inspect.custom](t,e){return e.depth<=2&&(e.depth=10),`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}function c(t){for(const e of t){const t=e.charCodeAt(0);if(32!==t&&(t<48||t>57))return!1}return!0}function f(t){for(const e of t)if(e.charCodeAt(0)>=128)return!1;return!0}function l(t,e=10){const r=parseInt(t,e);if(Number.isNaN(r))throw new Error(`Invalid numeric string "${t}" in radix ${e}.`);return r}e.ASN1=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(9),i=r(2),o=r(21),a=r(13),s=r(20),u=Object.create(null);u.CN=a.getOID("commonName"),u.commonName="CN",u.C=a.getOID("countryName"),u.countryName="C",u.L=a.getOID("localityName"),u.localityName="L",u.ST=a.getOID("stateOrProvinceName"),u.stateOrProvinceName="ST",u.O=a.getOID("organizationName"),u.organizationName="O",u.OU=a.getOID("organizationalUnitName"),u.organizationalUnitName="OU",u.E=a.getOID("emailAddress"),u.emailAddress="E";const c={name:"Certificate",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.NONE,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",class:o.Class.UNIVERSAL,tag:o.Tag.INTEGER,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",class:o.Class.UNIVERSAL,tag:o.Tag.INTEGER,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate.signature.algorithm",class:o.Class.UNIVERSAL,tag:o.Tag.OID,capture:"certinfoSignatureOID"},{name:"Certificate.TBSCertificate.signature.parameters",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,optional:!0,capture:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"certIssuer"},{name:"Certificate.TBSCertificate.validity",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.TBSCertificate.validity.notBefore",class:o.Class.UNIVERSAL,tag:[o.Tag.UTCTIME,o.Tag.GENERALIZEDTIME],capture:"certValidityNotBefore"},{name:"Certificate.TBSCertificate.validity.notAfter",class:o.Class.UNIVERSAL,tag:[o.Tag.UTCTIME,o.Tag.GENERALIZEDTIME],capture:"certValidityNotAfter"}]},{name:"Certificate.TBSCertificate.subject",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,capture:"certSubject"},s.publicKeyValidator,{name:"Certificate.TBSCertificate.issuerUniqueID",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.BOOLEAN,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.INTEGER,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.BITSTRING,capture:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"Certificate.signatureAlgorithm.algorithm",class:o.Class.UNIVERSAL,tag:o.Tag.OID,capture:"certSignatureOID"},{name:"Certificate.TBSCertificate.signature.parameters",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,optional:!0,capture:"certSignatureParams"}]},{name:"Certificate.signatureValue",class:o.Class.UNIVERSAL,tag:o.Tag.BITSTRING,capture:"certSignature"}]};class f{constructor(){this.attributes=[],this.uniqueId=null}get commonName(){return this.getFieldValue("commonName")}get organizationName(){return this.getFieldValue("organizationName")}get organizationalUnitName(){return this.getFieldValue("organizationalUnitName")}get countryName(){return this.getFieldValue("countryName")}get localityName(){return this.getFieldValue("localityName")}get serialName(){return this.getFieldValue("serialName")}getHash(){const t=i.createHash("sha1");for(const e of this.attributes)t.update(e.oid),t.update(e.value);return t.digest()}getField(t){for(const e of this.attributes)if(t===e.oid||t===e.name||t===e.shortName)return e;return null}addField(t){v([t]),this.attributes.push(t)}setAttrs(t){v(t),this.attributes=t}toJSON(){const t={};for(const e of this.attributes){const r=e.shortName;"string"==typeof r&&""!==r&&(t[r]=e.value)}return t.uniqueId=this.uniqueId,t.attributes=this.attributes,t}getFieldValue(t){const e=this.getField(t);return null!=e?e.value:""}}e.DistinguishedName=f;class l{static fromPEMs(t){const e=[],r=o.PEM.parse(t);for(const t of r){if("CERTIFICATE"!==t.type&&"X509 CERTIFICATE"!==t.type&&"TRUSTED CERTIFICATE"!==t.type)throw new Error("Could not convert certificate from PEM: invalid type");if(t.procType.includes("ENCRYPTED"))throw new Error("Could not convert certificate from PEM: PEM is encrypted.");const r=o.ASN1.fromDER(t.body);e.push(new l(r))}if(0===e.length)throw new Error("No Certificate");return e}static fromPEM(t){return l.fromPEMs(t)[0]}constructor(t){const e=Object.create(null),r=t.validate(c,e);if(null!=r)throw new Error("Cannot read X.509 certificate: "+r.message);if(this.raw=t.DER,this.version=null==e.certVersion?0:o.ASN1.parseIntegerNum(e.certVersion.bytes)+1,this.serialNumber=o.ASN1.parseIntegerStr(e.certSerialNumber.bytes),this.signatureOID=o.ASN1.parseOID(e.certSignatureOID.bytes),this.signatureAlgorithm=a.getOIDName(this.signatureOID),this.infoSignatureOID=o.ASN1.parseOID(e.certinfoSignatureOID.bytes),this.signature=o.ASN1.parseBitString(e.certSignature.bytes).buf,this.validFrom=o.ASN1.parseTime(e.certValidityNotBefore.tag,e.certValidityNotBefore.bytes),this.validTo=o.ASN1.parseTime(e.certValidityNotAfter.tag,e.certValidityNotAfter.bytes),this.issuer=new f,this.issuer.setAttrs(_(e.certIssuer)),null!=e.certIssuerUniqueId&&(this.issuer.uniqueId=o.ASN1.parseBitString(e.certIssuerUniqueId.bytes)),this.subject=new f,this.subject.setAttrs(_(e.certSubject)),null!=e.certSubjectUniqueId&&(this.subject.uniqueId=o.ASN1.parseBitString(e.certSubjectUniqueId.bytes)),this.extensions=[],this.subjectKeyIdentifier="",this.authorityKeyIdentifier="",this.ocspServer="",this.issuingCertificateURL="",this.isCA=!1,this.maxPathLen=-1,this.basicConstraintsValid=!1,this.keyUsage=0,this.dnsNames=[],this.emailAddresses=[],this.ipAddresses=[],this.uris=[],null!=e.certExtensions){this.extensions=function(t){const e=[];for(const r of t.mustCompound())for(const t of r.mustCompound())e.push(h(t));return e}(e.certExtensions);for(const t of this.extensions)if("string"==typeof t.subjectKeyIdentifier&&(this.subjectKeyIdentifier=t.subjectKeyIdentifier),"string"==typeof t.authorityKeyIdentifier&&(this.authorityKeyIdentifier=t.authorityKeyIdentifier),"string"==typeof t.authorityInfoAccessOcsp&&(this.ocspServer=t.authorityInfoAccessOcsp),"string"==typeof t.authorityInfoAccessIssuers&&(this.issuingCertificateURL=t.authorityInfoAccessIssuers),"boolean"==typeof t.basicConstraintsValid&&(this.isCA=t.isCA,this.maxPathLen=t.maxPathLen,this.basicConstraintsValid=t.basicConstraintsValid),"number"==typeof t.keyUsage&&(this.keyUsage=t.keyUsage),Array.isArray(t.altNames))for(const e of t.altNames)null!=e.dnsName&&this.dnsNames.push(e.dnsName),null!=e.email&&this.emailAddresses.push(e.email),null!=e.ip&&this.ipAddresses.push(e.ip),null!=e.uri&&this.uris.push(e.uri)}this.publicKey=new s.PublicKey(e.publicKeyInfo),this.publicKeyRaw=this.publicKey.toDER(),this.tbsCertificate=e.tbsCertificate}getExtension(t,e=""){for(const r of this.extensions)if(t===r.oid||t===r.name)return""===e?r:r[e];return null}checkSignature(t){if(3===this.version&&!this.basicConstraintsValid||this.basicConstraintsValid&&!this.isCA)return new Error("The parent constraint violation error");if(!0!==this.getExtension("keyUsage","keyCertSign"))return new Error("The parent constraint violation error");if(!t.isIssuer(this))return new Error("The parent certificate did not issue the given child certificate");const e=function(t){switch(a.getOIDName(t)){case"sha1WithRsaEncryption":return"sha1";case"md5WithRsaEncryption":return"md5";case"sha256WithRsaEncryption":return"sha256";case"sha384WithRsaEncryption":return"sha384";case"sha512WithRsaEncryption":return"sha512";case"RSASSA-PSS":return"sha256";case"ecdsaWithSha1":return"sha1";case"ecdsaWithSha256":return"sha256";case"ecdsaWithSha384":return"sha384";case"ecdsaWithSha512":return"sha512";case"dsaWithSha1":return"sha1";case"dsaWithSha256":return"sha256";default:return""}}(t.signatureOID);if(""===e)return new Error("Unknown child signature OID.");return!1===this.publicKey.verify(t.tbsCertificate.DER,t.signature,e)?new Error("Child signature not matched"):null}isIssuer(t){return this.issuer.getHash().equals(t.subject.getHash())}verifySubjectKeyIdentifier(){return this.publicKey.getFingerprint("sha1","PublicKey").toString("hex")===this.subjectKeyIdentifier}toJSON(){const t={};for(const e of Object.keys(this))t[e]=m(this[e]);return delete t.tbsCertificate,t}[n.inspect.custom](t,e){return e.depth<=2&&(e.depth=10),`<${this.constructor.name} ${n.inspect(this.toJSON(),e)}>`}}function h(t){const e={};switch(e.oid=o.ASN1.parseOID(t.value[0].bytes),e.critical=!1,t.value[1].tag===o.Tag.BOOLEAN?(e.critical=o.ASN1.parseBool(t.value[1].bytes),e.value=t.value[2].bytes):e.value=t.value[1].bytes,e.name=a.getOIDName(e.oid),e.name){case"keyUsage":!function(t){const e=o.ASN1.parseBitString(o.ASN1.fromDER(t.value).bytes);let r=0,n=0;t.keyUsage=0;for(let r=0;r<9;r++)0!==e.at(r)&&(t.keyUsage|=1<<r);e.buf.length>0&&(r=e.buf[0],n=e.buf.length>1?e.buf[1]:0);t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&n)}(e);break;case"basicConstraints":!function(t){const e=o.ASN1.fromDER(t.value).mustCompound();e.length>0&&e[0].tag===o.Tag.BOOLEAN?t.isCA=o.ASN1.parseBool(e[0].bytes):t.isCA=!1;let r=null;e.length>0&&e[0].tag===o.Tag.INTEGER?r=e[0].bytes:e.length>1&&(r=e[1].bytes);t.maxPathLen=null!==r?o.ASN1.parseInteger(r):-1;t.basicConstraintsValid=!0}(e);break;case"extKeyUsage":!function(t){const e=o.ASN1.fromDER(t.value).mustCompound();for(const r of e)t[a.getOIDName(o.ASN1.parseOID(r.bytes))]=!0}(e);break;case"nsCertType":!function(t){const e=o.ASN1.parseBitString(o.ASN1.fromDER(t.value).bytes);let r=0;e.buf.length>0&&(r=e.buf[0]);t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}(e);break;case"subjectAltName":case"issuerAltName":p(e);break;case"subjectKeyIdentifier":!function(t){const e=o.ASN1.parseDERWithTemplate(t.value,d);t.subjectKeyIdentifier=e.subjectKeyIdentifier.bytes.toString("hex")}(e);break;case"authorityKeyIdentifier":!function(t){const e=o.ASN1.parseDERWithTemplate(t.value,y);t.authorityKeyIdentifier=e.authorityKeyIdentifier.bytes.toString("hex")}(e);break;case"authorityInfoAccess":!function(t){const e=o.ASN1.parseDERWithTemplate(t.value,g);null!=e.authorityInfoAccessOcsp&&(t.authorityInfoAccessOcsp=e.authorityInfoAccessOcsp.bytes.toString());null!=e.authorityInfoAccessIssuers&&(t.authorityInfoAccessIssuers=e.authorityInfoAccessIssuers.bytes.toString())}(e)}return e}function p(t){t.altNames=[];const e=o.ASN1.fromDER(t.value).mustCompound();for(const r of e){const e={tag:r.tag,value:r.bytes};switch(t.altNames.push(e),r.tag){case 1:e.email=r.bytes.toString();break;case 2:e.dnsName=r.bytes.toString();break;case 6:e.uri=r.bytes.toString();break;case 7:e.ip=a.bytesToIP(r.bytes);break;case 8:e.oid=o.ASN1.parseOID(r.bytes)}}}e.Certificate=l;const d={name:"subjectKeyIdentifier",class:o.Class.UNIVERSAL,tag:o.Tag.OCTETSTRING,capture:"subjectKeyIdentifier"};const y={name:"authorityKeyIdentifier",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"authorityKeyIdentifier.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.NONE,capture:"authorityKeyIdentifier"}]};const g={name:"authorityInfoAccess",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,value:[{name:"authorityInfoAccess.authorityInfoAccessOcsp",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,optional:!0,value:[{name:"authorityInfoAccess.authorityInfoAccessOcsp.oid",class:o.Class.UNIVERSAL,tag:o.Tag.OID},{name:"authorityInfoAccess.authorityInfoAccessOcsp.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.OID,capture:"authorityInfoAccessOcsp"}]},{name:"authorityInfoAccess.authorityInfoAccessIssuers",class:o.Class.UNIVERSAL,tag:o.Tag.SEQUENCE,optional:!0,value:[{name:"authorityInfoAccess.authorityInfoAccessIssuers.oid",class:o.Class.UNIVERSAL,tag:o.Tag.OID},{name:"authorityInfoAccess.authorityInfoAccessIssuers.value",class:o.Class.CONTEXT_SPECIFIC,tag:o.Tag.OID,capture:"authorityInfoAccessIssuers"}]}]};function v(t){for(const e of t){if(null!=e.name&&""!==e.name||(null!=e.oid&&(e.name=a.getOIDName(e.oid)),""===e.name&&null!=e.shortName&&(e.name=a.getOIDName(u[e.shortName]))),null==e.oid||""===e.oid){if(""===e.name)throw new Error("Attribute oid not specified.");e.oid=a.getOID(e.name)}if(null!=e.shortName&&""!==e.shortName||(e.shortName=null==u[e.name]?"":u[e.name]),null==e.value)throw new Error("Attribute value not specified.")}}function _(t){const e=[];for(const n of t.mustCompound())for(const t of n.mustCompound()){const n=t.mustCompound(),i={};i.oid=o.ASN1.parseOID(n[0].bytes),i.value=n[1].value,i.valueTag=n[1].tag,i.name=a.getOIDName(i.oid),i.shortName=(r=i.name,null==u[r]?"":u[r]),e.push(i)}var r;return e}function m(t){return null==t||t instanceof Buffer||"function"!=typeof t.toJSON?t:t.toJSON()}},function(t){t.exports=JSON.parse('{"name":"alipay-sdk","version":"3.2.0","description":"蚂蚁金服开放平台 node sdk","main":"lib/alipay.js","scripts":{"build":"npm run tsc","tsc":"tsc -p ./tsconfig.json","tsc:watch":"tsc -w","lint":"tslint -p ./tsconfig.json --fix","lint:no-fix":"tslint -p ./tsconfig.json","test":"npm run build && mocha","ci":"npm run tsc && npm run lint:no-fix && nyc mocha -t 6000","prepublishOnly":"npm run tsc && npm run test"},"author":"dersoncheng","homepage":"https://github.com/ali-sdk/alipay-sdk","bugs":"https://github.com/ali-sdk/alipay-sdk/issues","license":"ISC","publishConfig":{"registry":"https://registry.npmjs.org"},"dependencies":{"@fidm/x509":"^1.2.1","@types/node":"^9.6.0","bignumber.js":"^9.0.0","camelcase-keys":"^4.2.0","crypto-js":"^4.0.0","decamelize":"^2.0.0","is":"^3.2.1","is-json":"^2.0.1","isuri":"^2.0.3","lodash":"^4.17.20","moment":"^2.16.0","request":"^2.86.0","snakecase-keys":"^1.1.1","urllib":"^2.17.0"},"nyc":{"extends":"@istanbuljs/nyc-config-typescript","include":["lib"],"extension":[".ts"],"check-coverage":true,"reporter":["text-summary","json","html"],"sourceMap":true},"ci":{"version":"8, 10, 12, 14"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^0.1.3","mocha":"^3.1.2","nyc":"^14.1.1","query-string":"^6.5.0","should":"^11.1.1","sinon":"^1.17.7","tslint":"^5.8.0","tslint-config-airbnb":"^5.4.2","typescript":"3.5.1"}}')},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(3);function i(t,e,r){e.forEach(e=>{void 0!==t[e]&&(t[e]=(0,n.accMul)(Number(t[e]),r))})}function o(t,e){e.forEach(e=>{void 0!==t[e]&&(t[e]=t[e].replace(/[-+:\s]/g,""))})}var a={unifiedOrder:{args:{_pre:t=>(i(t,["totalFee"],.01),t),totalAmount:"totalFee",buyerId:"openid"},returnValue:{transactionId:"tradeNo"}},getOrderInfo:{args:{_pre:t=>(i(t,["totalFee"],.01),t),buyerId:"openid",totalAmount:"totalFee"},returnValue:t=>("object"==typeof t&&t.qrCode&&(t.codeUrl=t.qrCode,delete t.qrCode),t)},orderQuery:{args:{tradeNo:"transactionId"},returnValue:{_pre:t=>(i(t,["totalAmount","settleAmount","buyerPayAmount","payAmount","pointAmount","invoiceAmount","receiptAmount","chargeAmount","mdiscountAmount","discountAmount"],100),o(t,["sendPayDate"]),t),transactionId:"tradeNo",openid:"buyerUserId",tradeState:function(t){switch(t.tradeStatus){case"WAIT_BUYER_PAY":return"USERPAYING";case"TRADE_CLOSED":return"CLOSED";case"TRADE_SUCCESS":return"SUCCESS";case"TRADE_FINISHED":return"FINISHED";default:return t.tradeStatus}},totalFee:"totalAmount",settlementTotalFee:"settleAmount",feeType:"transCurrency",cashFeeType:"payCurrency",cashFee:"buyerPayAmount",fundBillList:function(t){return t.fundBillList?t.fundBillList.map(t=>(t.amount=100*Number(t.amount),t.realAmount=100*Number(t.realAmount),t)):[]},tradeSettleDetailList:function(t){return t.tradeSettleDetailList?t.tradeSettleDetailList.map(t=>(t.amount=100*Number(t.amount),t)):[]},timeEnd:"sendPayDate",_purify:{shouldDelete:["tradeStatus"]}}},cancelOrder:{args:{tradeNo:"transactionId"},returnValue:{transactionId:"tradeNo"}},closeOrder:{args:{tradeNo:"transactionId"},returnValue:{transactionId:"tradeNo"}},refund:{args:{_pre:t=>(i(t,["refundFee","sendBackFee"],.01),t),tradeNo:"transactionId",refundAmount:"refundFee",outRequestNo:"outRefundNo",refundCurrency:"refundFeeType",refundReason:"refundDesc",goodsDetail:function(t){return t.goodsDetail?t.goodsDetail.map(t=>(t.price=Number(t.price)/100,t)):[]},refundRoyaltyParameters:function(t){return t.refundRoyaltyParameters?t.refundRoyaltyParameters.map(t=>(t.amount=Number(t.amount)/100,t)):[]}},returnValue:{_pre:t=>(i(t,["refundFee","presentRefundBuyerAmount","presentRefundDiscountAmount","presentRefundMdiscountAmount"],100),t),transactionId:"tradeNo",openid:"buyerUserId",cashRefundFee:"presentRefundBuyerAmount",refundId:"refundSettlementId",cashFeeType:"refundCurrency",refundDetailItemList:function(t){return t.refundDetailItemList?t.refundDetailItemList.map(t=>(t.amount=100*Number(t.amount),t.realAmount=100*Number(t.realAmount),t)):[]},refundPresetPaytoolList:function(t){return t.refundPresetPaytoolList?t.refundPresetPaytoolList.map(t=>(t.amount=100*Number(t.amount),t)):[]}}},refundQuery:{args:{tradeNo:"transactionId",outRequestNo:"outRefundNo"},returnValue:{_pre:t=>(i(t,["totalAmount","refundAmount","sendBackFee","presentRefundBuyerAmount","presentRefundBuyerAmount","presentRefundMdiscountAmount"],100),t),transactionId:"tradeNo",outRefundNo:"outRequestNo",totalFee:"totalAmount",refundFee:"refundAmount",refundDesc:"refundReason",refundId:"refundSettlementId",refundSuccessTime:"gmtRefundPay",refundRoyaltys:function(t){return t.refundRoyaltys?t.refundRoyaltys.map(t=>(t.refundAmount=100*Number(t.refundAmount),t)):[]},refundDetailItemList:function(t){return t.refundDetailItemList?t.refundDetailItemList.map(t=>(t.amount=100*Number(t.amount),t.realAmount=100*Number(t.realAmount),t)):[]}}},verifyPaymentNotify:{returnValue:{_pre:t=>(i(t,["invoiceAmount","receiptAmount","buyerPayAmount","totalAmount","pointAmount"],100),o(t,["gmtPayment"]),t),openid:"buyerId",transactionId:"tradeNo",totalFee:"totalAmount",cashFee:"buyerPayAmount",timeEnd:"gmtPayment",resultCode:function(t){return t.tradeStatus.replace("TRADE_","")},fundBillList:function(t){return t.fundBillList?JSON.parse(t.fundBillList).map(t=>(t.amount=100*Number(t.amount),t)):[]}}},verifyRefundNotify:{returnValue:{_pre:t=>(i(t,["totalAmount","refundFee"],100),t),openid:"buyerId",outRefundNo:"outBizNo",transactionId:"tradeNo",totalFee:"totalAmount",successTime:function(t){t.successTime=t.gmtRefund.replace("+","").split(".")[0]},resultCode:function(t){return t.tradeStatus.replace("TRADE_","")},fundBillList:function(t){return t.fundBillList?JSON.parse(t.fundBillList).map(t=>(t.amount=100*Number(t.amount),t)):[]},_purify:{shouldDelete:["gmtRefund"]}}}};e.default=a,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=class{constructor(t){t.sandbox&&(t.gateway="https://sandbox.itunes.apple.com/verifyReceipt"),t=Object.assign({gateway:"https://buy.itunes.apple.com/verifyReceipt",timeout:5e3,password:""},t),this.options=t}async _request(t){const e={method:"POST",contentType:"json",dataType:"json",data:t,timeout:this.options.timeout},{status:r,data:n}=await uniCloud.httpclient.request(this.options.gateway,e);if(200!==r)throw new Error("request fail");return this._parse(n)}_parse(t){const e=this._tradeState(t.status);return 0===t.status?{transactionId:t.receipt.transaction_id,receipt:t.receipt,...e}:e}_tradeState(t){let e="PAYERROR",r="";switch(t){case-1:e="NOTPAY";break;case 0:e="SUCCESS";break;default:r="Error status ["+t+"]"}return{tradeState:e,errMsg:r}}async verifyReceipt(t){const e=(t={"receipt-data":t.receiptData}).password||this.options.password;e&&(t.password=e);return await this._request(t)}},t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}n.default=t,r&&r.set(t,n);return n}(r(85)),i=s(r(86)),o=s(r(87)),a=r(3);function s(t){return t&&t.__esModule?t:{default:t}}function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}var c=class extends class{constructor(t){if(this.options=t,!t.appId)throw new Error("appId required");if(!t.mchId)throw new Error("mchId required");if(!t.v3Key)throw new Error("v3Key required");if(!t.appPrivateKeyPath&&!t.appPrivateKeyContent)throw new Error("missing appPrivateKeyPath or appPrivateKeyContent");if(!t.appCertPath&&!t.appCertContent)throw new Error("missing appCertPath or appCertContent");this._protocols=o.default,this.platformCertificate=[],this._baseURL="https://api.mch.weixin.qq.com",this._cert=t.appCertPath?i.default.loadCertFromPath(t.appCertPath):i.default.loadCertFromContent(i.default.formatKey(t.appCertContent,"CERTIFICATE")),this._privateKey=t.appPrivateKeyPath?i.default.loadPrivateKeyFromPath(t.appPrivateKeyPath):i.default.loadPrivateKeyFromContent(i.default.formatKey(t.appPrivateKeyContent,"PRIVATE KEY"))}_getAuthorization(t="GET",e="",r={}){const n=i.default.getNonceStr(),o=Date.parse(new Date)/1e3,a=[t,"GET"===t&&Object.keys(r).length>0?`${e}?${i.default.getQueryStr(r)}`:e,o,n,"GET"===t?"":JSON.stringify(r)].reduce((t,e)=>t+=e+"\n",""),s=i.default.rsaPrivateKeySign(this._privateKey.toPEM(),a).toString("base64"),u=this._cert.serialNumber.toUpperCase();return`WECHATPAY2-SHA256-RSA2048 mchid="${this.options.mchId}",nonce_str="${n}",signature="${s}",timestamp="${o}",serial_no="${u}"`}async _request(t,e,r="GET",n=200){e=(0,a.camel2snakeJson)(e);const i=this._getAuthorization(r,t,e);let{status:o,data:s={},headers:u}=await uniCloud.httpclient.request(`${this._baseURL}${t}`,{method:r,data:e,headers:{Accept:"application/json","content-type":"application/json",Authorization:i},dataType:"json",timeout:this.options.timeout});if(o!==n)throw new a.UniCloudError({code:s.code,message:s.message});return s||(s={}),await this._verifyResponseSign(u,s),s.appid&&(s.appId=s.appid),s.mchid&&(s.mchId=s.mchid),(0,a.snake2camelJson)(s)}_publicParams(t){const e={appid:this.options.appId,mchid:this.options.mchId};return Object.assign(e,t)}_getPayParamsByPrepayId(t,e){let r;switch(e){case"APP":r={appid:this.options.subAppId?this.options.subAppId:this.options.appId,partnerid:this.options.mchId,prepayid:t,package:"Sign=WXPay",noncestr:i.default.getNonceStr(),timestamp:""+(Date.now()/1e3|0)},r.sign=this._clientPaySign(r,e);break;case"JSAPI":default:{const n=""+(Date.now()/1e3|0);r={appId:this.options.subAppId?this.options.subAppId:this.options.appId,nonceStr:i.default.getNonceStr(),package:"prepay_id="+t,timeStamp:n},r.signType="RSA",r.paySign=this._clientPaySign(r,e),r.timestamp=n;break}}return r}_clientPaySign(t,e){const r=[t.appid||t.appId,t.timestamp||t.timeStamp,t.noncestr||t.nonceStr,"JSAPI"===e?t.package:t.prepayid].reduce((t,e)=>t+=e+"\n","");return i.default.rsaPrivateKeySign(this._privateKey.toPEM(),r).toString("base64")}async _getPlatformCert(){if(this.platformCertificate.length<=0){var t,e;const r="/v3/certificates",{status:n,data:o}=await uniCloud.httpclient.request(`${this._baseURL}${r}`,{method:"GET",headers:{Accept:"application/json","content-type":"application/json",Authorization:this._getAuthorization("GET",r)},dataType:"json",timeout:this.options.timeout});if(200!==n)throw new Error("request fail");this.platformCertificate=null!==(t=null===(e=o.data)||void 0===e?void 0:e.reduce((t,e)=>{if(e.encrypt_certificate){const{nonce:t,associated_data:r,ciphertext:n}=e.encrypt_certificate,o=i.default.decryptCiphertext(n,this.options.v3Key,t,r);e.certificate=i.default.loadCertFromContent(o)}return t.push(e),t},[]))&&void 0!==t?t:[]}return this.platformCertificate=this.platformCertificate.filter(t=>new Date(t.expire_time).getTime()>Date.now()),this.platformCertificate[0]}async _verifyResponseSign(t,e={}){const r=await this._getPlatformCert(),{"wechatpay-timestamp":n,"wechatpay-nonce":o,"wechatpay-signature":a}=t,s=[n,o,Object.keys(e).length?JSON.stringify(e):""].reduce((t,e)=>t+=e+"\n","");if(!i.default.rsaPublicKeyVerifySign(r.certificate.publicKey.toPEM(),s,a))throw new Error("response signature verification failed")}_downloadFile(t){const e=n.parse(t);return uniCloud.httpclient.request(t,{method:"GET",headers:{Accept:"application/json","content-type":"application/json",Authorization:this._getAuthorization("GET",e.path)},dataType:"text",timeout:this.options.timeout})}}{async getOrderInfo(t){if((t=this._publicParams(t)).sceneInfo.payerClientIp=t.sceneInfo.payerClientIp||"127.0.0.1","JSAPI"!==t.tradeType&&delete t.openid,!t.tradeType)throw new Error("tradeType required");const{tradeType:e,...r}=t,n=await this._request("/v3/pay/transactions/"+("MWEB"===t.tradeType?"h5":t.tradeType.toLowerCase()),r,"POST");if("NATIVE"===t.tradeType||"MWEB"===t.tradeType)return n;if(!n.prepayId)throw new Error(n.errMsg||"获取prepayId失败");return this._getPayParamsByPrepayId(n.prepayId,t.tradeType)}async orderQuery(t){var e;const r=await this._request(t.transactionId?"/v3/pay/transactions/id/"+t.transactionId:"/v3/pay/transactions/out-trade-no/"+t.outTradeNo,{mchid:this.options.mchId});if(r.settlementTotalFee=0,(null===(e=r.promotion_detail)||void 0===e?void 0:e.length)>0){const t=r.promotion_detail.reduce((t,e)=>("NOCASH"===e.type&&(t+=e.amount),t),0);r.settlementTotalFeeres=r.amount.total-t}return r}async closeOrder(t){return await this._request(`/v3/pay/transactions/out-trade-no/${t.outTradeNo}/close`,{mchid:this.options.mchId},"POST",204)}async refund(t){return await this._request("/v3/refund/domestic/refunds",t,"POST")}async refundQuery(t){return await this._request("/v3/refund/domestic/refunds/"+t.outRefundNo)}async downloadBill(t){return this._request("/v3/bill/tradebill",t).then(t=>this._downloadFile(t.downloadUrl)).then(t=>Promise.resolve({content:t.data}))}async downloadFundflow(t){return this._request("/v3/bill/fundflowbill",t).then(t=>this._downloadFile(t.downloadUrl)).then(t=>Promise.resolve({content:t.data}))}async checkNotifyType(t){const{headers:e}=t,r="string"==typeof t.body?JSON.parse(t.body):t.body;await this._verifyResponseSign(e,r);const{resource:n}=r;switch(null==n?void 0:n.original_type){case"transaction":default:return"payment";case"refund":return"refund"}}async verifyPaymentNotify(t){const{headers:e}=t,r="string"==typeof t.body?JSON.parse(t.body):t.body;await this._verifyResponseSign(e,r);const{resource:n}=r,o=i.default.decryptCiphertext(n.ciphertext,this.options.v3Key,n.nonce,n.associated_data);return(0,a.snake2camelJson)(JSON.parse(o))}async verifyRefundNotify(t){const{headers:e}=t,r="string"==typeof t.body?JSON.parse(t.body):t.body;await this._verifyResponseSign(e,r);const{resource:n}=r,o=i.default.decryptCiphertext(n.ciphertext,this.options.v3Key,n.nonce,n.associated_data);return(0,a.snake2camelJson)(JSON.parse(o))}};e.default=c,t.exports=e.default},function(t,e){t.exports=require("url")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(2))&&n.__esModule?n:{default:n},o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}n.default=t,r&&r.set(t,n);return n}(r(10)),a=r(19),s=r(3);function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}var c={decryptData:function(t,e,r=""){const n=i.default.createDecipheriv("aes-256-ecb",e,r);n.setAutoPadding(!0);let o=n.update(t,"base64","utf8");return o+=n.final("utf8"),o},md5:function(t,e="utf8"){return i.default.createHash("md5").update(t,e).digest("hex")},sha256:function(t,e,r="utf8"){return i.default.createHmac("sha256",e).update(t,r).digest("hex")},getQueryStr:function(t){return Object.keys(t).map(e=>e+"="+((0,s.isPlainObject)(t[e])?JSON.stringify(t[e]):t[e])).join("&")},getNonceStr:function(t=16){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)},decodeBase64:function(t){return Buffer.from(t,"base64").toString("utf-8")},decryptCiphertext:function(t,e,r,n){const o=Buffer.from(t,"base64"),a=i.default.createDecipheriv("aes-256-gcm",e,r);return a.setAuthTag(o.slice(-16)),a.setAAD(Buffer.from(n)),Buffer.concat([a.update(o.slice(0,-16)),a.final()]).toString()},loadCertFromPath:function(t){return a.Certificate.fromPEM(o.readFileSync(t))},loadCertFromContent:function(t){return"string"==typeof t&&(t=Buffer.from(t)),a.Certificate.fromPEM(t)},loadPrivateKeyFromPath:function(t){return a.PrivateKey.fromPEM(o.readFileSync(t))},loadPrivateKeyFromContent:function(t){return"string"==typeof t&&(t=Buffer.from(t)),a.PrivateKey.fromPEM(t)},rsaPrivateKeySign:function(t,e,r="base64"){return i.default.createSign("RSA-SHA256").update(Buffer.from(e),"utf8").sign(t)},rsaPublicKeyVerifySign:function(t,e,r){return i.default.createVerify("RSA-SHA256").update(e,"utf8").verify(t,r,"base64")},rsaPublicKeyEncryptData:function(t,e){return i.default.publicEncrypt({key:e,padding:i.default.constants.RSA_PKCS1_OAEP_PADDING},Buffer.from(t))},rsaPrivateKeyDecryptData:function(t,e){return"string"==typeof t&&(t=Buffer.from(t)),i.default.privateDecrypt({key:e,padding:i.default.constants.RSA_PKCS1_OAEP_PADDING},t).toString()},formatKey:function(t,e){return`-----BEGIN ${e}-----\n${t}\n-----END ${e}-----`}};e.default=c,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={getOrderInfo:{args:{_purify:{shouldDelete:["subject"]},"amount.total":"totalFee","payer.openid":"openid",description:"body","sceneInfo.payerClientIp":"spbillCreateIp"}},orderQuery:{arg:{_purify:{shouldDelete:["outTradeNo"]}},returnValue:{_purify:{shouldDelete:["appid","mchid","sceneInfo","promotionDetail"]},totalFee:"amount.total",cashFee:"amount.payer_total"}},refund:{args:{"amount.total":"totalFee","amount.refund":"refundFee","amount.currency":"refundFeeType",reason:"refundDesc"},returnValue:{refundFee:"amount.refund",cashRefundFee:"amount.payer_refund"}},refundQuery:{args:{shouldDelete:["outTradeNo","transactionId","refundId"]},returnValue:{totalFee:"amount.total",refundFee:"amount.refund"}},downloadFundflow:{args:{accountType:t=>t.accountType.toUpperCase()}},verifyPaymentNotify:{returnValue:{totalFee:"amount.total",cashFee:"amount.payer_total",feeType:"amount.currency",timeEnd:"success_time",openid:"payer.openid",returnCode:"trade_state"}},verifyRefundNotify:{returnValue:{totalFee:"amount.total",refundFee:"amount.refund",settlementTotalFee:"amount.payer_total",settlementRefundFee:"amount.payer_refund",refundRecvAccout:"user_received_account"}}},t.exports=e.default}])); |