jf-gamekit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/ttSdk.es.js ADDED
@@ -0,0 +1,18 @@
1
+ function t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach(function(e){t(r,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))})}return r}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={exports:{}};var c,a={exports:{}};function u(){return c||(c=1,a.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==o&&o.crypto&&(r=o.crypto),!r)try{r=require("crypto")}catch(t){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},c=s.lib={},a=c.Base={extend:function(t){var e=i(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)}},u=c.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,o=t.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;e[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var c=0;c<o;c+=4)e[n+c>>>2]=r[c>>>2];return this.sigBytes+=o,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=a.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(n());return new u.init(e,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).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 u.init(r,e/2)}},l=f.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}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 u.init(r,e)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=c.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,o=n.words,i=n.sigBytes,s=this.blockSize,c=i/(4*s),a=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,f=t.min(4*a,i);if(a){for(var h=0;h<a;h+=s)this._doProcessBlock(o,h);r=o.splice(0,a),n.sigBytes-=f}return new u.init(r,f)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});c.Hasher=p.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.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 v.HMAC.init(t,r).finalize(e)}}});var v=s.algo={};return s}(Math);return t}()),a.exports}var f,h={exports:{}};function l(){return f||(f=1,h.exports=function(t){return n=(r=t).lib,o=n.Base,i=n.WordArray,(s=r.x64={}).Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=o.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],n=0;n<e;n++){var o=t[n];r.push(o.high),r.push(o.low)}return i.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}}),t;var e,r,n,o,i,s}(u())),h.exports}var d,p={exports:{}};function v(){return d||(d=1,p.exports=function(t){return function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,r=e.init,n=e.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 e=t.byteLength,n=[],o=0;o<e;o++)n[o>>>2]|=t[o]<<24-o%4*8;r.call(this,n,e)}else r.apply(this,arguments)};n.prototype=e}}(),t.lib.WordArray}(u())),p.exports}var y,g={exports:{}};function _(){return y||(y=1,g.exports=function(t){return function(){var e=t,r=e.lib.WordArray,n=e.enc;function o(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o+=2){var i=e[o>>>2]>>>16-o%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(t){for(var e=t.length,n=[],o=0;o<e;o++)n[o>>>1]|=t.charCodeAt(o)<<16-o%2*16;return r.create(n,2*e)}},n.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i+=2){var s=o(e[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>1]|=o(t.charCodeAt(i)<<16-i%2*16);return r.create(n,2*e)}}}(),t.enc.Utf16}(u())),g.exports}var m,x={exports:{}};function w(){return m||(m=1,x.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var o=[],i=0,s=0;s<e;s++)if(s%4){var c=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=c<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var o=[],i=0;i<r;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;c<4&&i+.75*c<r;c++)o.push(n.charAt(s>>>6*(3-c)&63));var a=n.charAt(64);if(a)for(;o.length%4;)o.push(a);return o.join("")},parse:function(t){var e=t.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var c=t.indexOf(s);-1!==c&&(e=c)}return n(t,e,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(u())),x.exports}var B,k={exports:{}};function b(){return B||(B=1,k.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var o=[],i=0,s=0;s<e;s++)if(s%4){var c=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=c<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var r=t.words,n=t.sigBytes,o=e?this._safe_map:this._map;t.clamp();for(var i=[],s=0;s<n;s+=3)for(var c=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<n;a++)i.push(o.charAt(c>>>6*(3-a)&63));var u=o.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t,e){void 0===e&&(e=!0);var r=t.length,o=e?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s<o.length;s++)i[o.charCodeAt(s)]=s}var c=o.charAt(64);if(c){var a=t.indexOf(c);-1!==a&&(r=a)}return n(t,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),t.enc.Base64url}(u())),k.exports}var S,A={exports:{}};function C(){return S||(S=1,A.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.algo,c=[];!function(){for(var t=0;t<64;t++)c[t]=4294967296*e.abs(e.sin(t+1))|0}();var a=s.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,s=t[e+0],a=t[e+1],d=t[e+2],p=t[e+3],v=t[e+4],y=t[e+5],g=t[e+6],_=t[e+7],m=t[e+8],x=t[e+9],w=t[e+10],B=t[e+11],k=t[e+12],b=t[e+13],S=t[e+14],A=t[e+15],C=i[0],H=i[1],z=i[2],P=i[3];C=u(C,H,z,P,s,7,c[0]),P=u(P,C,H,z,a,12,c[1]),z=u(z,P,C,H,d,17,c[2]),H=u(H,z,P,C,p,22,c[3]),C=u(C,H,z,P,v,7,c[4]),P=u(P,C,H,z,y,12,c[5]),z=u(z,P,C,H,g,17,c[6]),H=u(H,z,P,C,_,22,c[7]),C=u(C,H,z,P,m,7,c[8]),P=u(P,C,H,z,x,12,c[9]),z=u(z,P,C,H,w,17,c[10]),H=u(H,z,P,C,B,22,c[11]),C=u(C,H,z,P,k,7,c[12]),P=u(P,C,H,z,b,12,c[13]),z=u(z,P,C,H,S,17,c[14]),C=f(C,H=u(H,z,P,C,A,22,c[15]),z,P,a,5,c[16]),P=f(P,C,H,z,g,9,c[17]),z=f(z,P,C,H,B,14,c[18]),H=f(H,z,P,C,s,20,c[19]),C=f(C,H,z,P,y,5,c[20]),P=f(P,C,H,z,w,9,c[21]),z=f(z,P,C,H,A,14,c[22]),H=f(H,z,P,C,v,20,c[23]),C=f(C,H,z,P,x,5,c[24]),P=f(P,C,H,z,S,9,c[25]),z=f(z,P,C,H,p,14,c[26]),H=f(H,z,P,C,m,20,c[27]),C=f(C,H,z,P,b,5,c[28]),P=f(P,C,H,z,d,9,c[29]),z=f(z,P,C,H,_,14,c[30]),C=h(C,H=f(H,z,P,C,k,20,c[31]),z,P,y,4,c[32]),P=h(P,C,H,z,m,11,c[33]),z=h(z,P,C,H,B,16,c[34]),H=h(H,z,P,C,S,23,c[35]),C=h(C,H,z,P,a,4,c[36]),P=h(P,C,H,z,v,11,c[37]),z=h(z,P,C,H,_,16,c[38]),H=h(H,z,P,C,w,23,c[39]),C=h(C,H,z,P,b,4,c[40]),P=h(P,C,H,z,s,11,c[41]),z=h(z,P,C,H,p,16,c[42]),H=h(H,z,P,C,g,23,c[43]),C=h(C,H,z,P,x,4,c[44]),P=h(P,C,H,z,k,11,c[45]),z=h(z,P,C,H,A,16,c[46]),C=l(C,H=h(H,z,P,C,d,23,c[47]),z,P,s,6,c[48]),P=l(P,C,H,z,_,10,c[49]),z=l(z,P,C,H,S,15,c[50]),H=l(H,z,P,C,y,21,c[51]),C=l(C,H,z,P,k,6,c[52]),P=l(P,C,H,z,p,10,c[53]),z=l(z,P,C,H,w,15,c[54]),H=l(H,z,P,C,a,21,c[55]),C=l(C,H,z,P,m,6,c[56]),P=l(P,C,H,z,A,10,c[57]),z=l(z,P,C,H,g,15,c[58]),H=l(H,z,P,C,b,21,c[59]),C=l(C,H,z,P,v,6,c[60]),P=l(P,C,H,z,B,10,c[61]),z=l(z,P,C,H,d,15,c[62]),H=l(H,z,P,C,x,21,c[63]),i[0]=i[0]+C|0,i[1]=i[1]+H|0,i[2]=i[2]+z|0,i[3]=i[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;r[o>>>5]|=128<<24-o%32;var i=e.floor(n/4294967296),s=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,u=0;u<4;u++){var f=a[u];a[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return c},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,r,n,o,i,s){var c=t+(e&r|~e&n)+o+s;return(c<<i|c>>>32-i)+e}function f(t,e,r,n,o,i,s){var c=t+(e&n|r&~n)+o+s;return(c<<i|c>>>32-i)+e}function h(t,e,r,n,o,i,s){var c=t+(e^r^n)+o+s;return(c<<i|c>>>32-i)+e}function l(t,e,r,n,o,i,s){var c=t+(r^(e|~n))+o+s;return(c<<i|c>>>32-i)+e}r.MD5=i._createHelper(a),r.HmacMD5=i._createHmacHelper(a)}(Math),t.MD5}(u())),A.exports}var H,z={exports:{}};function P(){return H||(H=1,z.exports=function(t){return r=(e=t).lib,n=r.WordArray,o=r.Hasher,i=e.algo,s=[],c=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],c=r[3],a=r[4],u=0;u<80;u++){if(u<16)s[u]=0|t[e+u];else{var f=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=f<<1|f>>>31}var h=(n<<5|n>>>27)+a+s[u];h+=u<20?1518500249+(o&i|~o&c):u<40?1859775393+(o^i^c):u<60?(o&i|o&c|i&c)-1894007588:(o^i^c)-899497514,a=c,c=i,i=o<<30|o>>>2,o=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+c|0,r[4]=r[4]+a|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=o.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=o._createHelper(c),e.HmacSHA1=o._createHmacHelper(c),t.SHA1;var e,r,n,o,i,s,c}(u())),z.exports}var D,E={exports:{}};function R(){return D||(D=1,E.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.algo,c=[],a=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(c[o]=r(e.pow(n,.5))),a[o]=r(e.pow(n,1/3)),o++),n++}();var u=[],f=s.SHA256=i.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],s=r[3],c=r[4],f=r[5],h=r[6],l=r[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var p=u[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,y=u[d-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;u[d]=v+u[d-7]+g+u[d-16]}var _=n&o^n&i^o&i,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),x=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&f^~c&h)+a[d]+u[d];l=h,h=f,f=c,c=s+x|0,s=i,i=o,o=n,n=x+(m+_)|0}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0,r[5]=r[5]+f|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;return r[o>>>5]|=128<<24-o%32,r[14+(o+64>>>9<<4)]=e.floor(n/4294967296),r[15+(o+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA256=i._createHelper(f),r.HmacSHA256=i._createHmacHelper(f)}(Math),t.SHA256}(u())),E.exports}var O,M={exports:{}};var F,I={exports:{}};function j(){return F||(F=1,I.exports=function(t){return function(){var e=t,r=e.lib.Hasher,n=e.x64,o=n.Word,i=n.WordArray,s=e.algo;function c(){return o.create.apply(o,arguments)}var a=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=c()}();var f=s.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],s=r[3],c=r[4],f=r[5],h=r[6],l=r[7],d=n.high,p=n.low,v=o.high,y=o.low,g=i.high,_=i.low,m=s.high,x=s.low,w=c.high,B=c.low,k=f.high,b=f.low,S=h.high,A=h.low,C=l.high,H=l.low,z=d,P=p,D=v,E=y,R=g,O=_,M=m,F=x,I=w,j=B,W=k,T=b,U=S,N=A,K=C,L=H,X=0;X<80;X++){var J,q,Q=u[X];if(X<16)q=Q.high=0|t[e+2*X],J=Q.low=0|t[e+2*X+1];else{var Z=u[X-15],G=Z.high,V=Z.low,Y=(G>>>1|V<<31)^(G>>>8|V<<24)^G>>>7,$=(V>>>1|G<<31)^(V>>>8|G<<24)^(V>>>7|G<<25),tt=u[X-2],et=tt.high,rt=tt.low,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,ot=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),it=u[X-7],st=it.high,ct=it.low,at=u[X-16],ut=at.high,ft=at.low;q=(q=(q=Y+st+((J=$+ct)>>>0<$>>>0?1:0))+nt+((J+=ot)>>>0<ot>>>0?1:0))+ut+((J+=ft)>>>0<ft>>>0?1:0),Q.high=q,Q.low=J}var ht,lt=I&W^~I&U,dt=j&T^~j&N,pt=z&D^z&R^D&R,vt=P&E^P&O^E&O,yt=(z>>>28|P<<4)^(z<<30|P>>>2)^(z<<25|P>>>7),gt=(P>>>28|z<<4)^(P<<30|z>>>2)^(P<<25|z>>>7),_t=(I>>>14|j<<18)^(I>>>18|j<<14)^(I<<23|j>>>9),mt=(j>>>14|I<<18)^(j>>>18|I<<14)^(j<<23|I>>>9),xt=a[X],wt=xt.high,Bt=xt.low,kt=K+_t+((ht=L+mt)>>>0<L>>>0?1:0),bt=gt+vt;K=U,L=N,U=W,N=T,W=I,T=j,I=M+(kt=(kt=(kt=kt+lt+((ht+=dt)>>>0<dt>>>0?1:0))+wt+((ht+=Bt)>>>0<Bt>>>0?1:0))+q+((ht+=J)>>>0<J>>>0?1:0))+((j=F+ht|0)>>>0<F>>>0?1:0)|0,M=R,F=O,R=D,O=E,D=z,E=P,z=kt+(yt+pt+(bt>>>0<gt>>>0?1:0))+((P=ht+bt|0)>>>0<ht>>>0?1:0)|0}p=n.low=p+P,n.high=d+z+(p>>>0<P>>>0?1:0),y=o.low=y+E,o.high=v+D+(y>>>0<E>>>0?1:0),_=i.low=_+O,i.high=g+R+(_>>>0<O>>>0?1:0),x=s.low=x+F,s.high=m+M+(x>>>0<F>>>0?1:0),B=c.low=B+j,c.high=w+I+(B>>>0<j>>>0?1:0),b=f.low=b+T,f.high=k+W+(b>>>0<T>>>0?1:0),A=h.low=A+N,h.high=S+U+(A>>>0<N>>>0?1:0),H=l.low=H+L,l.high=C+K+(H>>>0<L>>>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=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=r._createHelper(f),e.HmacSHA512=r._createHmacHelper(f)}(),t.SHA512}(u(),l())),I.exports}var W,T={exports:{}};var U,N={exports:{}};function K(){return U||(U=1,N.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.x64.Word,c=r.algo,a=[],u=[],f=[];!function(){for(var t=1,e=0,r=0;r<24;r++){a[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++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var o=1,i=0;i<24;i++){for(var c=0,h=0,l=0;l<7;l++){if(1&o){var d=(1<<l)-1;d<32?h^=1<<d:c^=1<<d-32}128&o?o=o<<1^113:o<<=1}f[i]=s.create(c,h)}}();var h=[];!function(){for(var t=0;t<25;t++)h[t]=s.create()}();var l=c.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,n=this.blockSize/2,o=0;o<n;o++){var i=t[e+2*o],s=t[e+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(H=r[o]).high^=s,H.low^=i}for(var c=0;c<24;c++){for(var l=0;l<5;l++){for(var d=0,p=0,v=0;v<5;v++)d^=(H=r[l+5*v]).high,p^=H.low;var y=h[l];y.high=d,y.low=p}for(l=0;l<5;l++){var g=h[(l+4)%5],_=h[(l+1)%5],m=_.high,x=_.low;for(d=g.high^(m<<1|x>>>31),p=g.low^(x<<1|m>>>31),v=0;v<5;v++)(H=r[l+5*v]).high^=d,H.low^=p}for(var w=1;w<25;w++){var B=(H=r[w]).high,k=H.low,b=a[w];b<32?(d=B<<b|k>>>32-b,p=k<<b|B>>>32-b):(d=k<<b-32|B>>>64-b,p=B<<b-32|k>>>64-b);var S=h[u[w]];S.high=d,S.low=p}var A=h[0],C=r[0];for(A.high=C.high,A.low=C.low,l=0;l<5;l++)for(v=0;v<5;v++){var H=r[w=l+5*v],z=h[w],P=h[(l+1)%5+5*v],D=h[(l+2)%5+5*v];H.high=z.high^~P.high&D.high,H.low=z.low^~P.low&D.low}H=r[0];var E=f[c];H.high^=E.high,H.low^=E.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,i=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,u=[],f=0;f<a;f++){var h=s[f],l=h.high,d=h.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u.push(d),u.push(l)}return new o.init(u,c)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});r.SHA3=i._createHelper(l),r.HmacSHA3=i._createHmacHelper(l)}(Math),t.SHA3}(u(),l())),N.exports}var L,X={exports:{}};var J,q={exports:{}};function Q(){return J||(J=1,q.exports=function(t){var e,r,n;r=(e=t).lib.Base,n=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=n.parse(e));var r=t.blockSize,o=4*r;e.sigBytes>o&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),c=i.words,a=s.words,u=0;u<r;u++)c[u]^=1549556828,a[u]^=909522486;i.sigBytes=s.sigBytes=o,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))}})}(u())),q.exports}var Z,G={exports:{}};var V,Y={exports:{}};function $(){return V||(V=1,Y.exports=function(t){return r=(e=t).lib,n=r.Base,o=r.WordArray,i=e.algo,s=i.MD5,c=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,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(),s=o.create(),c=s.words,a=n.keySize,u=n.iterations;c.length<a;){r&&i.update(r),r=i.update(t).finalize(e),i.reset();for(var f=1;f<u;f++)r=i.finalize(r),i.reset();s.concat(r)}return s.sigBytes=4*a,s}}),e.EvpKDF=function(t,e,r){return c.create(r).compute(t,e)},t.EvpKDF;var e,r,n,o,i,s,c}(u(),P(),Q())),Y.exports}var et,rt={exports:{}};function nt(){return et||(et=1,rt.exports=function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,o=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,c=r.enc;c.Utf8;var a=c.Base64,u=r.algo.EvpKDF,f=n.Cipher=s.extend({cfg:o.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(){s.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?m:g}return function(e){return{encrypt:function(r,n,o){return t(n).encrypt(e,r,n,o)},decrypt:function(r,n,o){return t(n).decrypt(e,r,n,o)}}}}()});n.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=r.mode={},l=n.BlockCipherMode=o.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}}),d=h.CBC=function(){var t=l.extend();function r(t,r,n){var o,i=this._iv;i?(o=i,this._iv=e):o=this._prevBlock;for(var s=0;s<n;s++)t[r+s]^=o[s]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize;r.call(this,t,e,o),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+o)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize,i=t.slice(e,e+o);n.decryptBlock(t,e),r.call(this,t,e,o),this._prevBlock=i}}),t}(),p=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,o=n<<24|n<<16|n<<8|n,s=[],c=0;c<n;c+=4)s.push(o);var a=i.create(s,n);t.concat(a)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:p}),reset:function(){var t;f.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});var v=n.CipherParams=o.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(a)},parse:function(t){var e,r=a.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=n.SerializableCipher=o.extend({cfg:o.extend({format:y}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var o=t.createEncryptor(r,n),i=o.finalize(e),s=o.cfg;return v.create({ciphertext:i,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.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}}),_=(r.kdf={}).OpenSSL={execute:function(t,e,r,n,o){if(n||(n=i.random(8)),o)s=u.create({keySize:e+r,hasher:o}).compute(t,n);else var s=u.create({keySize:e+r}).compute(t,n);var c=i.create(s.words.slice(e),4*r);return s.sigBytes=4*e,v.create({key:s,iv:c,salt:n})}},m=n.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:_}),encrypt:function(t,e,r,n){var o=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=o.iv;var i=g.encrypt.call(this,t,e,o.key,n);return i.mixIn(o),i},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var o=n.kdf.execute(r,t.keySize,t.ivSize,e.salt,n.hasher);return n.iv=o.iv,g.decrypt.call(this,t,e,o.key,n)}})}()}(u(),$())),rt.exports}var ot,it={exports:{}};function st(){return ot||(ot=1,it.exports=function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function r(t,e,r,n){var o,i=this._iv;i?(o=i.slice(0),this._iv=void 0):o=this._prevBlock,n.encryptBlock(o,0);for(var s=0;s<r;s++)t[e+s]^=o[s]}return e.Encryptor=e.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize;r.call(this,t,e,o,n),this._prevBlock=t.slice(e,e+o)}}),e.Decryptor=e.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize,i=t.slice(e,e+o);r.call(this,t,e,o,n),this._prevBlock=i}}),e}(),t.mode.CFB}(u(),nt())),it.exports}var ct,at={exports:{}};function ut(){return ct||(ct=1,at.exports=function(t){return t.mode.CTR=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._counter;o&&(i=this._counter=o.slice(0),this._iv=void 0);var s=i.slice(0);r.encryptBlock(s,0),i[n-1]=i[n-1]+1|0;for(var c=0;c<n;c++)t[e+c]^=s[c]}}),e.Decryptor=r,e),t.mode.CTR;var e,r}(u(),nt())),at.exports}var ft,ht={exports:{}};function lt(){return ft||(ft=1,ht.exports=function(t){
2
+ /** @preserve
3
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
4
+ * derived from CryptoJS.mode.CTR
5
+ * Jan Hruby jhruby.web@gmail.com
6
+ */
7
+ return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function r(t){if(255&~(t>>24))t+=1<<24;else{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}return t}function n(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var o=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,o=r.blockSize,i=this._iv,s=this._counter;i&&(s=this._counter=i.slice(0),this._iv=void 0),n(s);var c=s.slice(0);r.encryptBlock(c,0);for(var a=0;a<o;a++)t[e+a]^=c[a]}});return e.Decryptor=o,e}(),t.mode.CTRGladman}(u(),nt())),ht.exports}var dt,pt={exports:{}};function vt(){return dt||(dt=1,pt.exports=function(t){return t.mode.OFB=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._keystream;o&&(i=this._keystream=o.slice(0),this._iv=void 0),r.encryptBlock(i,0);for(var s=0;s<n;s++)t[e+s]^=i[s]}}),e.Decryptor=r,e),t.mode.OFB;var e,r}(u(),nt())),pt.exports}var yt,gt={exports:{}};var _t,mt={exports:{}};var xt,wt={exports:{}};var Bt,kt={exports:{}};var bt,St={exports:{}};var At,Ct={exports:{}};var Ht,zt={exports:{}};var Pt,Dt={exports:{}};var Et,Rt={exports:{}};function Ot(){return Et||(Et=1,Rt.exports=function(t){return function(){var e=t,r=e.lib,n=r.WordArray,o=r.BlockCipher,i=e.algo,s=[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],c=[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],a=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{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],h=i.DES=o.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var n=s[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(var o=this._subKeys=[],i=0;i<16;i++){var u=o[i]=[],f=a[i];for(r=0;r<24;r++)u[r/6|0]|=e[(c[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=e[28+(c[r+24]-1+f)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=o[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],l.call(this,4,252645135),l.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),l.call(this,1,1431655765);for(var n=0;n<16;n++){for(var o=r[n],i=this._lBlock,s=this._rBlock,c=0,a=0;a<8;a++)c|=u[a][((s^o[a])&f[a])>>>0];this._lBlock=s,this._rBlock=i^c}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,l.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),l.call(this,16,65535),l.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function l(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function d(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}e.DES=o._createHelper(h);var p=i.TripleDES=o.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),r=t.length<4?t.slice(0,2):t.slice(2,4),o=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(e)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(o))},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});e.TripleDES=o._createHelper(p)}(),t.TripleDES}(u(),w(),C(),$(),nt())),Rt.exports}var Mt,Ft={exports:{}};var It,jt={exports:{}};var Wt,Tt={exports:{}};var Ut,Nt={exports:{}};function Kt(){return Ut||(Ut=1,Nt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo;const o=16,i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function a(t,e){let r=e>>24&255,n=e>>16&255,o=e>>8&255,i=255&e,s=t.sbox[0][r]+t.sbox[1][n];return s^=t.sbox[2][o],s+=t.sbox[3][i],s}function u(t,e,r){let n,i=e,s=r;for(let e=0;e<o;++e)i^=t.pbox[e],s=a(t,i)^s,n=i,i=s,s=n;return n=i,i=s,s=n,s^=t.pbox[o],i^=t.pbox[o+1],{left:i,right:s}}function f(t,e,r){let n,i=e,s=r;for(let e=o+1;e>1;--e)i^=t.pbox[e],s=a(t,i)^s,n=i,i=s,s=n;return n=i,i=s,s=n,s^=t.pbox[1],i^=t.pbox[0],{left:i,right:s}}function h(t,e,r){for(let e=0;e<4;e++){t.sbox[e]=[];for(let r=0;r<256;r++)t.sbox[e][r]=s[e][r]}let n=0;for(let s=0;s<o+2;s++)t.pbox[s]=i[s]^e[n],n++,n>=r&&(n=0);let c=0,a=0,f=0;for(let e=0;e<o+2;e+=2)f=u(t,c,a),c=f.left,a=f.right,t.pbox[e]=c,t.pbox[e+1]=a;for(let e=0;e<4;e++)for(let r=0;r<256;r+=2)f=u(t,c,a),c=f.left,a=f.right,t.sbox[e][r]=c,t.sbox[e][r+1]=a;return!0}var l=n.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4;h(c,e,r)}},encryptBlock:function(t,e){var r=u(c,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},decryptBlock:function(t,e){var r=f(c,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=r._createHelper(l)}(),t.Blowfish}(u(),w(),C(),$(),nt())),Nt.exports}var Lt;var Xt=(Lt||(Lt=1,s.exports=function(t){return t}(u(),l(),v(),_(),w(),b(),C(),P(),R(),O||(O=1,M.exports=function(t){return r=(e=t).lib.WordArray,n=e.algo,o=n.SHA256,i=n.SHA224=o.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=4,t}}),e.SHA224=o._createHelper(i),e.HmacSHA224=o._createHmacHelper(i),t.SHA224;var e,r,n,o,i}(u(),R())),j(),W||(W=1,T.exports=function(t){return r=(e=t).x64,n=r.Word,o=r.WordArray,i=e.algo,s=i.SHA512,c=i.SHA384=s.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}}),e.SHA384=s._createHelper(c),e.HmacSHA384=s._createHmacHelper(c),t.SHA384;var e,r,n,o,i,s,c}(u(),l(),j())),K(),L||(L=1,X.exports=function(t){
8
+ /** @preserve
9
+ (c) 2012 by Cédric Mesnil. All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
12
+
13
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ - 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.
15
+
16
+ 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.
17
+ */
18
+ return function(){var e=t,r=e.lib,n=r.WordArray,o=r.Hasher,i=e.algo,s=n.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]),c=n.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]),a=n.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]),u=n.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]),f=n.create([0,1518500249,1859775393,2400959708,2840853838]),h=n.create([1352829926,1548603684,1836072691,2053994217,0]),l=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,l,m,x,w,B,k,b,S,A,C,H=this._hash.words,z=f.words,P=h.words,D=s.words,E=c.words,R=a.words,O=u.words;for(B=i=H[0],k=l=H[1],b=m=H[2],S=x=H[3],A=w=H[4],r=0;r<80;r+=1)C=i+t[e+D[r]]|0,C+=r<16?d(l,m,x)+z[0]:r<32?p(l,m,x)+z[1]:r<48?v(l,m,x)+z[2]:r<64?y(l,m,x)+z[3]:g(l,m,x)+z[4],C=(C=_(C|=0,R[r]))+w|0,i=w,w=x,x=_(m,10),m=l,l=C,C=B+t[e+E[r]]|0,C+=r<16?g(k,b,S)+P[0]:r<32?y(k,b,S)+P[1]:r<48?v(k,b,S)+P[2]:r<64?p(k,b,S)+P[3]:d(k,b,S)+P[4],C=(C=_(C|=0,O[r]))+A|0,B=A,A=S,S=_(b,10),b=k,k=C;C=H[1]+m+S|0,H[1]=H[2]+x+A|0,H[2]=H[3]+w+B|0,H[3]=H[4]+i+k|0,H[4]=H[0]+l+b|0,H[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 o=this._hash,i=o.words,s=0;s<5;s++){var c=i[s];i[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},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 p(t,e,r){return t&e|~t&r}function v(t,e,r){return(t|~e)^r}function y(t,e,r){return t&r|e&~r}function g(t,e,r){return t^(e|~r)}function _(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(l),e.HmacRIPEMD160=o._createHmacHelper(l)}(),t.RIPEMD160}(u())),Q(),Z||(Z=1,G.exports=function(t){return n=(r=(e=t).lib).Base,o=r.WordArray,s=(i=e.algo).SHA256,c=i.HMAC,a=i.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:25e4}),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=o.create(),s=o.create([1]),a=i.words,u=s.words,f=r.keySize,h=r.iterations;a.length<f;){var l=n.update(e).finalize(s);n.reset();for(var d=l.words,p=d.length,v=l,y=1;y<h;y++){v=n.finalize(v),n.reset();for(var g=v.words,_=0;_<p;_++)d[_]^=g[_]}i.concat(l),u[0]++}return i.sigBytes=4*f,i}}),e.PBKDF2=function(t,e,r){return a.create(r).compute(t,e)},t.PBKDF2;var e,r,n,o,i,s,c,a}(u(),R(),Q())),$(),nt(),st(),ut(),lt(),vt(),yt||(yt=1,gt.exports=function(t){return t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e),t.mode.ECB;var e}(u(),nt())),_t||(_t=1,mt.exports=function(t){return t.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,n=4*e,o=n-r%n,i=r+o-1;t.clamp(),t.words[i>>>2]|=o<<24-i%4*8,t.sigBytes+=o},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923}(u(),nt())),xt||(xt=1,wt.exports=function(t){return t.pad.Iso10126={pad:function(e,r){var n=4*r,o=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126}(u(),nt())),Bt||(Bt=1,kt.exports=function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971}(u(),nt())),bt||(bt=1,St.exports=function(t){return t.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}}},t.pad.ZeroPadding}(u(),nt())),At||(At=1,Ct.exports=function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding}(u(),nt())),Ht||(Ht=1,zt.exports=function(t){return r=(e=t).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(t){return t.ciphertext.toString(n)},parse:function(t){var e=n.parse(t);return r.create({ciphertext:e})}},t.format.Hex;var e,r,n}(u(),nt())),Pt||(Pt=1,Dt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo,o=[],i=[],s=[],c=[],a=[],u=[],f=[],h=[],l=[],d=[];!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 p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=t[r],y=t[v],g=t[y],_=257*t[p]^16843008*p;s[r]=_<<24|_>>>8,c[r]=_<<16|_>>>16,a[r]=_<<8|_>>>24,u[r]=_,_=16843009*g^65537*y^257*v^16843008*r,f[p]=_<<24|_>>>8,h[p]=_<<16|_>>>16,l[p]=_<<8|_>>>24,d[p]=_,r?(r=v^t[t[t[g^v]]],n^=t[t[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.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),i=this._keySchedule=[],s=0;s<n;s++)s<r?i[s]=e[s]:(u=i[s-1],s%r?r>6&&s%r==4&&(u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u]):(u=o[(u=u<<8|u>>>24)>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u],u^=p[s/r|0]<<24),i[s]=i[s-r]^u);for(var c=this._invKeySchedule=[],a=0;a<n;a++){if(s=n-a,a%4)var u=i[s];else u=i[s-4];c[a]=a<4||s<=4?u:f[o[u>>>24]]^h[o[u>>>16&255]]^l[o[u>>>8&255]]^d[o[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,c,a,u,o)},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,h,l,d,i),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,o,i,s,c){for(var a=this._nRounds,u=t[e]^r[0],f=t[e+1]^r[1],h=t[e+2]^r[2],l=t[e+3]^r[3],d=4,p=1;p<a;p++){var v=n[u>>>24]^o[f>>>16&255]^i[h>>>8&255]^s[255&l]^r[d++],y=n[f>>>24]^o[h>>>16&255]^i[l>>>8&255]^s[255&u]^r[d++],g=n[h>>>24]^o[l>>>16&255]^i[u>>>8&255]^s[255&f]^r[d++],_=n[l>>>24]^o[u>>>16&255]^i[f>>>8&255]^s[255&h]^r[d++];u=v,f=y,h=g,l=_}v=(c[u>>>24]<<24|c[f>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[d++],y=(c[f>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&u])^r[d++],g=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[u>>>8&255]<<8|c[255&f])^r[d++],_=(c[l>>>24]<<24|c[u>>>16&255]<<16|c[f>>>8&255]<<8|c[255&h])^r[d++],t[e]=v,t[e+1]=y,t[e+2]=g,t[e+3]=_},keySize:8});e.AES=r._createHelper(v)}(),t.AES}(u(),w(),C(),$(),nt())),Ot(),Mt||(Mt=1,Ft.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=n.RC4=r.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var s=o%r,c=e[s>>>2]>>>24-s%4*8&255;i=(i+n[o]+c)%256;var a=n[o];n[o]=n[i],n[i]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var t=this._S,e=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+t[e=(e+1)%256])%256;var i=t[e];t[e]=t[r],t[r]=i,n|=t[(t[e]+t[r])%256]<<24-8*o}return this._i=e,this._j=r,n}e.RC4=r._createHelper(o);var s=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)i.call(this)}});e.RC4Drop=r._createHelper(s)}(),t.RC4}(u(),w(),C(),$(),nt())),It||(It=1,jt.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=[],i=[],s=[],c=n.Rabbit=r.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],o=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++)a.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(e){var i=e.words,s=i[0],c=i[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(o[0]^=u,o[1]^=h,o[2]^=f,o[3]^=l,o[4]^=u,o[5]^=h,o[6]^=f,o[7]^=l,r=0;r<4;r++)a.call(this)}},_doProcessBlock:function(t,e){var r=this._X;a.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[e+n]^=o[n]},blockSize:4,ivSize:2});function a(){for(var t=this._X,e=this._C,r=0;r<8;r++)i[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],o=65535&n,c=n>>>16,a=((o*o>>>17)+o*c>>>15)+c*c,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=a^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=r._createHelper(c)}(),t.Rabbit}(u(),w(),C(),$(),nt())),Wt||(Wt=1,Tt.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=[],i=[],s=[],c=n.RabbitLegacy=r.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 o=0;o<4;o++)a.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(e){var i=e.words,s=i[0],c=i[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(n[0]^=u,n[1]^=h,n[2]^=f,n[3]^=l,n[4]^=u,n[5]^=h,n[6]^=f,n[7]^=l,o=0;o<4;o++)a.call(this)}},_doProcessBlock:function(t,e){var r=this._X;a.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[e+n]^=o[n]},blockSize:4,ivSize:2});function a(){for(var t=this._X,e=this._C,r=0;r<8;r++)i[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],o=65535&n,c=n>>>16,a=((o*o>>>17)+o*c>>>15)+c*c,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=a^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=r._createHelper(c)}(),t.RabbitLegacy}(u(),w(),C(),$(),nt())),Kt())),s.exports),Jt=i(Xt),qt=Xt.MD5("page.jsxingqier.com").toString(),Qt=Jt.enc.Utf8.parse(qt.substr(0,24)),Zt=Jt.enc.Utf8.parse("dssearch".substr(0,8));var Gt={des_encrypt:function(t){return"object"==n(t)&&(t=JSON.stringify(t)),Jt.TripleDES.encrypt(t,Qt,{iv:Zt,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString()},des_decrypt:function(t){var e=(t=t.replace('"',"").replace('"',"")).toString(Jt.enc.Utf8);return Jt.TripleDES.decrypt(e,Qt,{iv:Zt,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString(Jt.enc.Utf8)}},Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fail",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;tt.showToast({title:t,icon:e,duration:r,mask:!0,success:n})},Yt="https://page.hurricanegame.cn/",$t="POST";function te(t,e,r){return new Promise(function(n,o){tt.request({url:Yt+e,method:t,data:t===$t?JSON.stringify(r):r,header:{"content-type":"application/json"},success:function(t){200===t.statusCode?n(t.data):console.error("Network Error!")}})})}function ee(t){t.time=parseInt(Date.parse(new Date)/1e3);var e=function(t){for(var e=Object.keys(t).sort(),r={},n=0;n<e.length;n++){var o=e[n];r[o]=t[o]}return r}(t);return t.sign||(t.sign=Xt.MD5(function(t){var e="";for(var r in t){var n="";null!=t[r]?n=t[r]:t[r]="",e+=r+"="+n+"&"}return e=e.slice(0,e.length-1)}(e)+"WvgAUx8i0JeG5aaF").toString()),t}var re={mac:"",imei:"",oaid:"",androidid:"",idfa:"",idfv:"",sdkver:"1.0.0"},ne=0,oe=function(){var t={duid:""},e=tt.getStorageSync("duid");if(e)t.duid=e,ne=0;else{console.log(ne);var r=function(){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",e="",r=0;r<32;r++)e+=t.charAt(Math.floor(48*Math.random()));return e}();tt.setStorageSync("duid",r),t.duid=r,ne=1}return t},ie=function(){var t={os:"",brand:"",resolution:"",model:"",sysver:""};try{var e=tt.getSystemInfoSync();t.sysver=e.system,t.resolution=e.screenWidth+"*"+e.screenHeight,t.model=e.model,t.os=e.platform,t.brand=e.brand}catch(t){console.log(t),console.log("获取设备系统信息失败")}return t},se=function(){return r(r(r({},oe()),ie()),re)},ce=JSON.stringify(tt.getLaunchOptionsSync()||""),ae={},ue={},fe={},he={},le=null,de=20,pe=!1,ve=!1,ye=function(t){var e=r(r(r(r(r(r({},ae),ue),fe),he),r(r({},oe()),re)),{},{launchoption:ce});t&&(e.res=JSON.stringify(t));var n=ee(e);te($t,"/ttgamesend/send/",n).then(function(t){console.log(t)}).catch(function(t){console.log(t)})},ge=function(t,e){var n=ee(r(r(r(r(r({},ae),fe),ue),r(r({},oe()),re)),{},{launchoption:ce}));te($t,"/ttgamesend/index/",n).then(function(r){if(1===r.state){var n=r.data,o=n.balance,i=n.platform;o>=t?ye():"android"===i?function(t,e){var r=t.mode,n=t.buyQuantity,o=t.env,i=t.currencyType,s=t.platform,c=t.zoneId;console.log("【调支付】",{mode:r,env:o,currencyType:i,platform:s,buyQuantity:n,zoneId:c,customId:e}),tt.requestGamePayment({mode:r,env:o,currencyType:i,platform:s,buyQuantity:n,zoneId:c,customId:e,success:function(t){ye(t),console.log("【调用函数成功】",t)},fail:function(t){console.log("【调用函数失败】",t)},complete:function(){console.log("调用完成")}})}(r.data,e):function(t,e){var r=t.buyQuantity,n=t.zoneId;tt.openAwemeCustomerService({currencyType:"CNY",buyQuantity:r,zoneId:n+"",customId:e,success:function(t){ye(t)},fail:function(t){console.log("【调用函数失败】",t)},complete:function(t){console.log("调用完成")}})}(r.data,e)}}).catch(function(t){console.log(t)})},_e=function(){var t,e,n,o=ee(r(r(r(r(r(r({},ue),fe),ae),he),se()),{},{pway:"wxnativepay",launchoption:ce,sign:Xt.MD5("".concat(o.partner_id).concat(o.game_id).concat(o.pkg_name).concat(o.version).concat(o.sdkver).concat(o.time,"qvEw6PzHFfkiZsIQ").concat(o.moid)).toString()}));(t=$t,e="/search/indexEncry",n={joking:Gt.des_encrypt(o)},new Promise(function(r,o){tt.request({url:Yt+e,method:t,data:t===$t?JSON.stringify(n):n,success:function(t){console.log(t),200===t.statusCode?t.data?r(t.data):o("request interface error"):console.error("Network Error!")}})})).then(function(t){console.log("【次数】",de);try{var e=JSON.parse(Gt.des_decrypt(t));console.log("【返回结果】",e),e.state?(Vt("充值成功"),clearTimeout(le)):me()}catch(t){console.log("【err】",t)}})},me=function(){0==de?(clearTimeout(le),de=20):le=setTimeout(function(){de--,_e()},1e3)},xe=function(t){return new Promise(function(e,r){if(!t)return r({state:100001,msg:"激活入参缺失"});if(null==t||!t.tt)return r({state:100002,msg:"激活入参 tt 属性缺失"});var n=t.tt,o=n.game_id,i=n.version;if(!o)return r({state:100003,msg:"激活入参 game_id 属性缺失"});ue.game_id=o,ue.version=i,ue.pkg_name="dygame",ue.partner_id=145,pe=!0,console.log("active 激活成功!"),e()})},we=function(){return new Promise(function(t,e){if(!pe)return e({state:100003,msg:"登录前请先激活"});tt.login({success:function(n){if(n.isLogin){var o=ee(r(r(r({code:n.code,anonymousCode:n.anonymousCode},ue),r(r(r(r({},oe()),ie()),re),{},{install:ne,ntype:""})),{},{launchoption:ce}));te($t,"/ttgamelogin/initlogin/",o).then(function(e){var r=e.data||{},n=r.openid,o=r.token,i=r.uid,s=r.uname;fe={openid:n,token:o,uid:i,uname:s},ve=!0,t(e.data)}).catch(function(t){e({state:100001,msg:t.msg})})}},fail:function(){e({state:100002,msg:"tt.login 出错"})}})})},Be=function(t){return new Promise(function(e,n){if(!pe||!ve)return Vt("失败!请先激活登录"),n({state:100001,msg:"未激活或未登录,请检查"});var o=ee(r(r(r(r(r({},t),fe),ue),r(r({},oe()),re)),{},{launchoption:ce,onshow:ce}));te($t,"/ttgameevent/index/",o).then(function(){return e()}).catch(function(){return n({state:100002,msg:"角色上报失败"})})})},ke=function(){tt.openCustomerServiceConversation({type:2,success:function(t){console.log(t)},fail:function(t){console.log(t)}})},be=function(t){var e=null,r=!1,n=!1,o=function(){return r||n?Promise.resolve():(r=!0,new Promise(function(o,i){(e=tt.createRewardedVideoAd({adUnitId:t,progressTip:!0})).load().then(function(){n=!0,r=!1,o()}).catch(function(t){r=!1,n=!1,e=null,i(t)})}))},i=function(){return n?new Promise(function(t,r){e?(e.onClose(function(t){console.log("广告关闭:",t.isEnded?"正常播放完成":"用户提前关闭")}),e.show().then(function(){console.log("激励视频广告展示成功"),t()}).catch(function(t){n=!1,r({state:100003,msg:JSON.stringify(t)})})):r({state:100002,msg:"广告实例不存在"})}):o().then(i).catch(function(t){return Promise.reject({state:100001,msg:JSON.stringify(t)})})};return{preload:o,show:i}},Se=function(t){return new Promise(function(e,n){if(!pe||!ve)return Vt("失败!请先激活登录"),n({state:100001,msg:"未激活或未登录,请重新进入游戏"});tt.showLoading({title:"加载中"}),ae=r(r({},t),{},{money:t.dmoney});var o=ee(r(r(r(r(r({},ue),fe),ae),se()),{},{launchoption:ce}));te($t,"/ttgameorder/index/",o).then(function(t){var r=t||{},o=r.state,i=r.msg,s=r.data,c=void 0===s?{}:s;if(1==o){var a=c.aid,u=c.moid,f=c.code_url;he.moid=u,1==a?(ge(ae.dmoney,u),e({msg:"ok"})):2==a?(e({code_url:f,show_state:1}),clearTimeout(le),_e()):(Vt("失败!设备未识别"),n({state:100004,msg:"支付失败"}))}else Vt(i),n({state:o,msg:i});tt.hideLoading()}).catch(function(t){Vt(t),n({state:100002,msg:"支付失败"}),tt.hideLoading()})})},Ae=function(){return new Promise(function(t,e){tt.getUserProfile({success:function(e){return t(e.userInfo)},fail:function(t){return e({state:100001,msg:JSON.stringify(t)})}})})},Ce=function(t){},He=function(t){},ze=function(t){},Pe=function(t){};export{xe as jf_active,be as jf_createRewardedVideoAd,ke as jf_customerService,Ae as jf_getUserInfo,we as jf_login,Se as jf_pay,He as jf_profanityCheck,Ce as jf_share,Pe as jf_showInterstitialAd,Be as jf_trace,ze as jf_tracePageView};
package/es/wxSdk.es.js ADDED
@@ -0,0 +1,7 @@
1
+ function e(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o,i,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;wx.showToast({title:e,icon:t,duration:n,mask:!0,success:r})},u="POST";function c(e,t,n){return new Promise(function(r,o){wx.request({url:"https://page.hurricanegame.cn"+t,method:e,data:e===u?JSON.stringify(n):n,header:{"content-type":"application/json"},success:function(e){200===e.statusCode?e.data.state?r(e.data):o("request interface error"):console.error("Network Error!")}})})}var s=(i||(i=1,o={md5:function(e){function t(e,t){return e<<t|e>>>32-t}function n(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function r(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e&t|~e&n}(r,o,i),a),c)),n(t(e,u),r)}function o(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e&n|t&~n}(r,o,i),a),c)),n(t(e,u),r)}function i(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e^t^n}(r,o,i),a),c)),n(t(e,u),r)}function a(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return t^(e|~n)}(r,o,i),a),c)),n(t(e,u),r)}function u(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var c,s,l,f,d,p,v,h,g,y=Array();for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e),y=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u<n;)a=u%4*8,i[t=(u-u%4)/4]=i[t]|e.charCodeAt(u)<<a,u++;return a=u%4*8,i[t=(u-u%4)/4]=i[t]|128<<a,i[o-2]=n<<3,i[o-1]=n>>>29,i}(e),p=1732584193,v=4023233417,h=2562383102,g=271733878,c=0;c<y.length;c+=16)s=p,l=v,f=h,d=g,p=r(p,v,h,g,y[c+0],7,3614090360),g=r(g,p,v,h,y[c+1],12,3905402710),h=r(h,g,p,v,y[c+2],17,606105819),v=r(v,h,g,p,y[c+3],22,3250441966),p=r(p,v,h,g,y[c+4],7,4118548399),g=r(g,p,v,h,y[c+5],12,1200080426),h=r(h,g,p,v,y[c+6],17,2821735955),v=r(v,h,g,p,y[c+7],22,4249261313),p=r(p,v,h,g,y[c+8],7,1770035416),g=r(g,p,v,h,y[c+9],12,2336552879),h=r(h,g,p,v,y[c+10],17,4294925233),v=r(v,h,g,p,y[c+11],22,2304563134),p=r(p,v,h,g,y[c+12],7,1804603682),g=r(g,p,v,h,y[c+13],12,4254626195),h=r(h,g,p,v,y[c+14],17,2792965006),p=o(p,v=r(v,h,g,p,y[c+15],22,1236535329),h,g,y[c+1],5,4129170786),g=o(g,p,v,h,y[c+6],9,3225465664),h=o(h,g,p,v,y[c+11],14,643717713),v=o(v,h,g,p,y[c+0],20,3921069994),p=o(p,v,h,g,y[c+5],5,3593408605),g=o(g,p,v,h,y[c+10],9,38016083),h=o(h,g,p,v,y[c+15],14,3634488961),v=o(v,h,g,p,y[c+4],20,3889429448),p=o(p,v,h,g,y[c+9],5,568446438),g=o(g,p,v,h,y[c+14],9,3275163606),h=o(h,g,p,v,y[c+3],14,4107603335),v=o(v,h,g,p,y[c+8],20,1163531501),p=o(p,v,h,g,y[c+13],5,2850285829),g=o(g,p,v,h,y[c+2],9,4243563512),h=o(h,g,p,v,y[c+7],14,1735328473),p=i(p,v=o(v,h,g,p,y[c+12],20,2368359562),h,g,y[c+5],4,4294588738),g=i(g,p,v,h,y[c+8],11,2272392833),h=i(h,g,p,v,y[c+11],16,1839030562),v=i(v,h,g,p,y[c+14],23,4259657740),p=i(p,v,h,g,y[c+1],4,2763975236),g=i(g,p,v,h,y[c+4],11,1272893353),h=i(h,g,p,v,y[c+7],16,4139469664),v=i(v,h,g,p,y[c+10],23,3200236656),p=i(p,v,h,g,y[c+13],4,681279174),g=i(g,p,v,h,y[c+0],11,3936430074),h=i(h,g,p,v,y[c+3],16,3572445317),v=i(v,h,g,p,y[c+6],23,76029189),p=i(p,v,h,g,y[c+9],4,3654602809),g=i(g,p,v,h,y[c+12],11,3873151461),h=i(h,g,p,v,y[c+15],16,530742520),p=a(p,v=i(v,h,g,p,y[c+2],23,3299628645),h,g,y[c+0],6,4096336452),g=a(g,p,v,h,y[c+7],10,1126891415),h=a(h,g,p,v,y[c+14],15,2878612391),v=a(v,h,g,p,y[c+5],21,4237533241),p=a(p,v,h,g,y[c+12],6,1700485571),g=a(g,p,v,h,y[c+3],10,2399980690),h=a(h,g,p,v,y[c+10],15,4293915773),v=a(v,h,g,p,y[c+1],21,2240044497),p=a(p,v,h,g,y[c+8],6,1873313359),g=a(g,p,v,h,y[c+15],10,4264355552),h=a(h,g,p,v,y[c+6],15,2734768916),v=a(v,h,g,p,y[c+13],21,1309151649),p=a(p,v,h,g,y[c+4],6,4149444226),g=a(g,p,v,h,y[c+11],10,3174756917),h=a(h,g,p,v,y[c+2],15,718787259),v=a(v,h,g,p,y[c+9],21,3951481745),p=n(p,s),v=n(v,l),h=n(h,f),g=n(g,d);return(u(p)+u(v)+u(h)+u(g)).toLowerCase()}}),o);function l(e){e.time=parseInt(Date.parse(new Date)/1e3);var t=function(e){for(var t=Object.keys(e).sort(),n={},r=0;r<t.length;r++){var o=t[r];n[o]=e[o]}return n}(e);return e.sign||(e.sign=s.md5(function(e){var t="";for(var n in e){var r="";null!=e[n]?r=e[n]:e[n]="",t+=n+"="+r+"&"}return t.slice(0,t.length-1)}(t)+"WvgAUx8i0JeG5aaF")),e}function f(e){var t;if("object"===r(e))if(Array.isArray(e))for(var n in t=[],e)t.push(f(e[n]));else if(null===e)t=null;else if(e.constructor===RegExp)t=e;else for(var o in t={},e)t[o]=f(e[o]);else t=e;return t}var d={mac:"",imei:"",oaid:"",androidid:"",idfa:"",idfv:"",sdkver:"1.0"},p=0,v=function(){var e={duid:""},t=wx.getStorageSync("duid");if(t)e.duid=t,p=0;else{console.log(p);var n=function(){for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",t="",n=0;n<32;n++)t+=e.charAt(Math.floor(48*Math.random()));return t}();wx.setStorageSync("duid",n),e.duid=n,p=1}return e},h=function(){var e={client:"",brand:"",resolution:"",model:"",sysver:""};try{var t=wx.getSystemInfoSync();e.sysver=t.system,e.resolution=t.screenWidth+"*"+t.screenHeight,e.model=t.model,e.client=t.platform,e.brand=t.brand}catch(e){console.log("【获取设备系统信息失败】",e)}return e},g=function(){return n(n(n(n({},v()),h()),d),{},{install:p,ntype:""})};
2
+ /**
3
+ * @dn-sdk/minigame v1.5.5
4
+ * (c) 2025
5
+ * @license ISC
6
+ */
7
+ function y(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function x(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=function(e){if("object"!==E(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===E(t)?t:String(t)}var N,P,L="LOCAL_ID",M="CLICK_ID",D="QUEUE_LOST_MAP",q="REMOTE_CONFIG",U="REMOTE_COMMON_CONFIG",j="OPENID",F={init:"init",reporting:"reporting",fail:"fail"},B={maxSdkInstance:4,maxQueueLength:500,actionParamMaxLength:1e4,autoTrack:!0,reportThreshold:5,reportDelay:1,inspectDelay:30,cgiBatchSize:50,requestConcurrency:4,requestTimeout:1e4,signVersion:"1.0",realTimeActionList:["START_APP","REGISTER","PURCHASE"]},V="JS_RUN_ERROR",K="REQUEST_ERROR",G="REQUEST_CONFIG_ERROR",W="JS_QUEUE_LOG",J="PROXY_ERROR",H="QUEUE_LOST_NUM",Q="SIGN_ERROR",Y="UNKNOWN",z="TRUE",$="FALSE",Z="TICKET_INTERVAL_CHANGE",X=(P=function(e){return"".concat("@dn-sdk/minigame","_").concat("production","_").concat(e)},{getSync:function(e){var t;try{t=wx.getStorageSync(P(e))}catch(e){return console.error("storage get error",e),t}return t},setSync:function(e,t){try{wx.setStorageSync(P(e),t)}catch(e){return console.error("storage set error",e),!1}return!0}}),ee=function(){var e;return function(){if(!e){var t=function(){if(N)return N;try{return N=wx.getSystemInfoSync()}catch(e){return{}}}(),n=t.system,r=void 0===n?"":n,o=(null==r?void 0:r.split(" "))||[],i=function(e){if(!e)return Y;var t=(null==e?void 0:e.toUpperCase())||"";return t.indexOf("ANDROID")>-1?"ANDROID":t.indexOf("IOS")>-1?"IOS":t.indexOf("MAC")>-1?"OSX":t.indexOf("WINDOWS")>-1?"WINDOWS":Y}(o[0]),a=function(e){return!e||e.length<=0?"":2===e.length?e[1]:3===e.length&&"Windows"===e[0]?"".concat(e[1]," ").concat(e[2]):e[e.length-1]}(o);e={benchmark_level:t.benchmarkLevel,device_brand:t.brand,screen_height:Math.floor(t.screenHeight),screen_width:Math.floor(t.screenWidth),wx_lib_version:t.SDKVersion,wx_version:t.version,wx_platform:t.platform,device_model:t.model,os:i,os_version:a}}return e}}(),te=function(){var e;return function(){try{if(e)return e;e||(e=X.getSync(L)||""),e||(e=ye(),X.setSync(L,e))}catch(e){}return e}}(),ne=function(){var e="unknown",t=!1;return function(){if(!t)try{wx.getNetworkType({success:function(t){e=t.networkType},fail:function(){e="unknown"}}),wx.onNetworkStatusChange(function(t){e=t.networkType}),t=!0}catch(e){}return e}}();ne();var re=function(){var e="";return function(){return e||(e=X.getSync(j)||""),e}}(),oe=function(){var e;return function(){if(e)return e;try{var t=wx.getAccountInfoSync();return pe(t.miniProgram)?e=t.miniProgram:{}}catch(t){return{}}}}();function ie(e){var t=null==e?void 0:e.query;if(!pe(t))return"";var n="";return t.gdt_vid||[1045,1046,1084].indexOf(null==e?void 0:e.scene)>-1?n="TENCENT":t.clue_token||t.clickid&&t.item_id?n="BYTEDANCE":t.callback&&"kuaishou"===t.ksChannel?n="KUAISHOU":t.bd_vid||t.ai&&t.d&&t.q&&t.c?n="BAIDU":t.uctrackid?n="ALIBABA":(t.trackid||t.imp||[1065,1069,1194].indexOf(null==e?void 0:e.scene)>-1&&(t.callback||t.u))&&(n="OTHERS"),n}function ae(e,t){try{var n=ee(),r=oe(),o={sdk_version:"1.5.5",sdk_name:"@dn-sdk/minigame",device_brand:null==n?void 0:n.device_brand,device_model:null==n?void 0:n.device_model,wx_version:null==n?void 0:n.wx_version,wx_lib_version:null==n?void 0:n.wx_lib_version,wx_platform:null==n?void 0:n.wx_platform,os:null==n?void 0:n.os,os_version:null==n?void 0:n.os_version,local_id:te(),env_version:null==r?void 0:r.envVersion,appid:null==r?void 0:r.appId},i=Object.assign(o,e);wx.request({url:"https://api.datanexus.qq.com/data-nexus-trace/log",data:i,method:"POST",timeout:B.requestTimeout,success:function(e){"function"==typeof t&&200===(null==e?void 0:e.statusCode)&&t()}})}catch(n){Oe.error(n)}}var ue=function(){function e(){O(this,e)}return x(e,null,[{key:"revise",value:function(e){e>0&&!this.isRevised&&(this.offsetTime=e-Date.now(),this.isRevised=!0)}},{key:"getRevisedcurrentTimeMillis",value:function(){return this.isRevised?Date.now()+this.offsetTime:-1}}]),e}();function ce(e){return new Promise(function(t,n){wx.request({method:"POST",url:"https://api.datanexus.qq.com/data-nexus-config/v1/sdk/config/get",data:e,timeout:B.requestTimeout,success:function(e){se(e,t,"config/get",n),fe(e)},fail:function(e){le(e,"config/get",n)}})})}function se(e,t,n,r){var o,i,a,u,c=null==e?void 0:e.statusCode,s=null==(o=null==e?void 0:e.data)?void 0:o.code;if(200!==c||0!==s){var l=s;200!==c&&(l="number"==typeof c?-1*c:-888),ae({log_type:G,message:"cgiName: ".concat(n,", statusCode: ").concat(c,", code: ").concat(s,", traceid: ").concat(null==(a=null==e?void 0:e.data)?void 0:a.trace_id),code:l}),null==r||r(null==(u=null==e?void 0:e.data)?void 0:u.data)}else t(null==(i=e.data)?void 0:i.data)}function le(e,t,n){ae({log_type:G,message:"cgiName: ".concat(t," , message: ").concat(null==e?void 0:e.errMsg," "),code:"number"==typeof(null==e?void 0:e.errno)?-1*e.errno:-999}),null==n||n(e)}function fe(e){var t,n=1*(null==(t=null==e?void 0:e.header)?void 0:t["Server-Time"]);n>17266752e5&&ue.revise(n)}ue.offsetTime=0,ue.isRevised=!1;var de=Object.prototype.toString,pe=function(e){return"[object Object]"===de.call(e)},ve=function(e){return"[object Array]"===de.call(e)},he=function(e){return"[object Function]"===de.call(e)},ge=(new Date).getTime();function ye(){var e=(new Date).getTime(),t=Math.abs(1e3*(e-ge));return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=16*Math.random();return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),("x"===n?r:3&r|8).toString(16).replace(/-/g,"")})}var me=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,_e=function(e){if("string"!=typeof e)throw new TypeError("Invalid argument expected string");if(!me.test(e))throw new Error("Invalid argument not valid semver ('".concat(e,"' received)"))},Ae=function(e){return isNaN(Number(e))?e:Number(e)},ke=function(e){var t=e.replace(/^v/,"").replace(/\+.*$/,""),n=function(e){return-1===e.indexOf("-")?e.length:e.indexOf("-")}(t),r=t.substring(0,n).split(".");return r.push(t.substring(n+1)),r},Se=function(e,t){[e,t].forEach(_e);for(var n=ke(e),r=ke(t),o=0;o<Math.max(n.length-1,r.length-1);o++){var i=parseInt(n[o]||"0",10),a=parseInt(r[o]||"0",10);if(i>a)return 1;if(a>i)return-1}var u=n[n.length-1],c=r[r.length-1];if(u&&c)for(var s=u.split(".").map(Ae),l=c.split(".").map(Ae),f=0;f<Math.max(s.length,l.length);f++){if(void 0===s[f]||"string"==typeof l[f]&&"number"==typeof s[f])return-1;if(void 0===l[f]||"string"==typeof s[f]&&"number"==typeof l[f]||s[f]>l[f])return 1;if(l[f]>s[f])return-1}else if(u||c)return u?-1:1;return 0};function be(e){return Te()[e]}function Te(){return B}function we(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Re=function(e){try{return e&&"string"==typeof e?-1===(e=e.replace(/\s/g,"")).indexOf(".")?e:e.split(".").slice(0,2).join("."):""}catch(t){return e}},Ee=function(){function e(){O(this,e)}return x(e,null,[{key:"error",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).error.apply(t,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(e)].concat(r))}},{key:"info",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.debug&&(n=console).info.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}},{key:"log",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.debug&&(n=console).log.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}},{key:"warn",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).warn.apply(t,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(e)].concat(r))}},{key:"devLog",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.isDev&&(n=console).log.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}}]),e}(),Oe=Ee;Oe.debug=!1,Oe.isDev=!1;var Ie=function(){var e;return function(){if(!e)try{var t=wx.getLaunchOptionsSync(),n=t.query.gdt_vid||"";n?X.setSync(M,n):n=X.getSync(M)||"";var r=JSON.stringify(t);r.length>1e4&&(r=JSON.stringify({cut:1,scene:t.scene})),e={source_scene:t.scene,pkg_channel_id:t.query.wxgamepro||"",ad_trace_id:n,launch_options:r,channel:ie(t)}}catch(t){e={},Oe.log("获取场景值和渠道号失败",t)}return e}}();function xe(e,t,n){var r=n.value;return n.value=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];try{return r.apply(this,o)}catch(n){try{Oe.error.apply(Oe,["calling ".concat(e.constructor.name,".").concat(t," error with arguments")].concat(o)),Oe.error(n);var a={log_type:V,message:"[safeExcutable] ".concat(e.constructor.name,".").concat(t,": ").concat(null==n?void 0:n.message),err_stack:null==n?void 0:n.stack};he(this.reportLog)?this.reportLog(a):ae(a)}catch(a){}}},n}var Ce=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Pe=function(e,t,n,r){for(var o,i=r>1?void 0:r?Ne(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ce(t,n,i),i},Le=function(){function e(t){var n=t.userActionSetId,r=t.maxLength,o=void 0===r?500:r;O(this,e),this.lostActionMaps={},this.stack=[],this.localStorageKey="",this.localStorageKey="".concat("QUEUE_ACTIONS","_").concat(null==n?void 0:n.toString()),this.maxLength=o,this.userActionSetId=n,this.setTimeStamp(),this.init()}return x(e,[{key:"getItems",value:function(){return this.stack}},{key:"getStorage",value:function(){var e,t=(null==(e=X)?void 0:e.getSync(this.localStorageKey))||"[]";return JSON.parse(t)}},{key:"reportLostNum",value:function(){var e=this,t=Object.assign({},this.lostActionMaps),n=[];for(var r in t){var o=null==r?void 0:r.split("_");n.push({queue_lost_session_id:o[0],queue_lost_timestamp:o[1],queue_lost_num:t[r]})}n.length&&(this.setTimeStamp(),n.forEach(function(t){var n=Object.assign({},{user_action_set_id:e.userActionSetId,log_type:H},t),r=null==t?void 0:t.queue_lost_session_id,o=null==t?void 0:t.queue_lost_timestamp,i="".concat(r,"_").concat(o);ae(n,function(){we(e.lostActionMaps,i)&&(delete e.lostActionMaps[i],X.setSync(D,JSON.stringify(e.lostActionMaps)))})}))}},{key:"getLostMaps",value:function(){return this.lostActionMaps}},{key:"init",value:function(){var e=this,t=this.getStorage(),n=null==t?void 0:t.map(function(e){var t,n;return e.inner_status===(null==(t=F)?void 0:t.reporting)?Object.assign({},e,{inner_status:null==(n=F)?void 0:n.fail,is_retry:!0,retry_count:e.retry_count+1}):e});this.stack=n,this.lostActionMaps=JSON.parse(X.getSync(D)||"{}"),setTimeout(function(){e.reportLostNum()},1e3)}},{key:"addItem",value:function(e){var t;null==(t=null==this?void 0:this.stack)||t.push(e)}},{key:"removeItems",value:function(e){var t,n=null==(t=null==this?void 0:this.stack)?void 0:t.filter(function(t){return!(null!=e&&e.includes(null==t?void 0:t.action_id))});this.stack=n}},{key:"updateForReportFail",value:function(e){var t;this.stack=null==(t=this.stack)?void 0:t.map(function(t){var n;return null!=e&&e.includes(null==t?void 0:t.action_id)?Object.assign({},t,{inner_status:null==(n=F)?void 0:n.fail,retry_count:t.retry_count+1,is_retry:!0}):t})}},{key:"updateForReporting",value:function(e){var t;this.stack=null==(t=this.stack)?void 0:t.map(function(t){var n;return null!=e&&e.includes(null==t?void 0:t.action_id)?Object.assign({},t,{inner_status:null==(n=F)?void 0:n.reporting}):t})}},{key:"updateAllStack",value:function(e){this.stack=e}},{key:"updateToStorage",value:function(){X.setSync(this.localStorageKey,JSON.stringify(this.stack))}},{key:"updateLostAction",value:function(e){if(e){var t="".concat(e,"_").concat(this.timeStamp),n=this.lostActionMaps[t]||0;this.lostActionMaps[t]=n+1,X.setSync(D,JSON.stringify(this.lostActionMaps))}}},{key:"setTimeStamp",value:function(){this.timeStamp=Date.now().toString()}}]),e}();Pe([xe],Le.prototype,"getItems",1),Pe([xe],Le.prototype,"getStorage",1),Pe([xe],Le.prototype,"reportLostNum",1),Pe([xe],Le.prototype,"getLostMaps",1),Pe([xe],Le.prototype,"init",1),Pe([xe],Le.prototype,"addItem",1),Pe([xe],Le.prototype,"removeItems",1),Pe([xe],Le.prototype,"updateForReportFail",1),Pe([xe],Le.prototype,"updateForReporting",1),Pe([xe],Le.prototype,"updateAllStack",1),Pe([xe],Le.prototype,"updateToStorage",1),Pe([xe],Le.prototype,"updateLostAction",1);var Me=Object.defineProperty,De=Object.getOwnPropertyDescriptor,qe=function(e,t,n,r){for(var o,i=r>1?void 0:r?De(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Me(t,n,i),i},Ue=function(){k(t,Le);var e=b(t);function t(n){var r,o=n.userActionSetId,i=n.maxLength,a=void 0===i?500:i,u=n.ogEvents,c=void 0===u?[]:u;return O(this,t),(r=e.call(this,{userActionSetId:o,maxLength:a})).ogEvents=c,r}return x(t,[{key:"getReportableActions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=this.getItems(),n=[];return null==t||t.forEach(function(t){var r;(null==n?void 0:n.length)<e&&(null==t?void 0:t.inner_status)!==(null==(r=F)?void 0:r.reporting)&&(null==n||n.push(t))}),n}},{key:"addAction",value:function(e){var t={code:0,message:"成功",actionId:e.action_id},n=this.getItems();if((null==n?void 0:n.length)>=this.maxLength){var r="队列长度超过最大限制".concat(this.maxLength,"条,SDK将按照行为优先级排序,丢弃优先级最低的行为事件");Oe.warn(r),ae({user_action_set_id:this.userActionSetId,log_type:W,message:"队列长度超过限制"});var o=this.sortQueue(e,n);Oe.debug&&Oe.info("超过".concat(this.maxLength,"条按优先级排序的队列:"),o.concat([]));var i=o.pop();this.updateAllStack(o),this.updateLostAction((null==i?void 0:i.session_id)||""),(null==i?void 0:i.action_id)===e.action_id&&(t={code:103,message:"缓存队列已满,主动丢弃行为"})}else this.addItem(e);return this.updateToStorage(),t}},{key:"removeActions",value:function(e){this.removeItems(e),this.updateToStorage()}},{key:"updateActionsForReportFail",value:function(e){this.updateForReportFail(e),this.updateToStorage()}},{key:"updateActionsForReporting",value:function(e){this.updateForReporting(e),this.updateToStorage()}},{key:"getReportableActionsLength",value:function(){var e=this.getItems().filter(function(e){var t;return(null==e?void 0:e.inner_status)!==(null==(t=F)?void 0:t.reporting)});return null==e?void 0:e.length}},{key:"sortQueue",value:function(e,t){var n=this,r={},o=null==e?void 0:e.action_time,i=t.concat([e]),a=function(e){return r[e.action_id]||(r[e.action_id]=n.caculateWeight(o,e)),r[e.action_id]};return i.sort(function(e,t){return a(t)-a(e)})}},{key:"caculateWeight",value:function(e,t){var n,r=0,o=this.formatWeight(e,null==t?void 0:t.action_time),i=o.ogWeight,a=o.sdkWeight,u=o.userWeight;null!=(n=this.ogEvents)&&n.includes(null==t?void 0:t.action_type)&&(r+=i),null!=t&&t.is_sdk_auto_track?r+=a:r+=u;var c=e-(null==t?void 0:t.action_time)+1;return c>0?r+1/c:r}},{key:"formatWeight",value:function(e,t){var n=1e3,r=10,o=100;return e-t>2592e6&&(n/=100,r/=100,o/=100),{ogWeight:n,sdkWeight:r,userWeight:o}}}]),t}();qe([xe],Ue.prototype,"getReportableActions",1),qe([xe],Ue.prototype,"addAction",1),qe([xe],Ue.prototype,"removeActions",1),qe([xe],Ue.prototype,"updateActionsForReportFail",1),qe([xe],Ue.prototype,"updateActionsForReporting",1),qe([xe],Ue.prototype,"getReportableActionsLength",1),qe([xe],Ue.prototype,"sortQueue",1),qe([xe],Ue.prototype,"caculateWeight",1),qe([xe],Ue.prototype,"formatWeight",1);var je=function(){function e(){O(this,e),this.events={}}return x(e,[{key:"subscribe",value:function(t,n){e.checkCallback(n),ve(this.events[t])?this.events[t].push(n):this.events[t]=[n]}},{key:"once",value:function(t,n){e.checkCallback(n),this.subscribe(this.onceEventName(t),n)}},{key:"unsubscribe",value:function(t,n){e.checkCallback(n),ve(this.events[t])&&(this.events[t]=this.events[t].filter(function(e){return e!==n})),ve(this.events[this.onceEventName(t)])&&(this.events[this.onceEventName(t)]=this.events[this.onceEventName(t)].filter(function(e){return e!==n}))}},{key:"publish",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Date.now();ve(this.events[e])&&this.events[e].forEach(function(e){return e.apply(void 0,[o].concat(n))}),ve(this.events[this.onceEventName(e)])&&(this.events[this.onceEventName(e)].forEach(function(e){return e.apply(void 0,[o].concat(n))}),this.events[this.onceEventName(e)]=[])}},{key:"onceEventName",value:function(e){return"once_event_prefix_".concat(e)}}],[{key:"checkCallback",value:function(t){he(t)||Oe.error(e.ERROR_CALLBACK_IS_NOT_A_FUNCTION)}}]),e}(),Fe=je;Fe.ERROR_CALLBACK_IS_NOT_A_FUNCTION="callback 不是函数";var Be=new Fe,Ve=["REGISTER","VIEW_CONTENT","ADD_TO_CART","PURCHASE","COMPLETE_ORDER","ADD_TO_WISHLIST","START_APP","CREATE_ROLE","AUTHORIZE","TUTORIAL_FINISH","START_PAY","FINISH_PAY"],Ke="START_APP",Ge="TICKET",We="ENTER_FOREGROUND",Je="ENTER_BACKGROUND",He="LOGIN",Qe="SHARE",Ye="TAP_GAME_CLUB",ze="CREATE_GAME_CLUB",$e="JOIN_GAME_ROOM",Ze="FINISH_PAY",Xe="START_PAY",et="ADD_TO_WISHLIST",tt=["REGISTER","START_APP","RE_ACTIVE"],nt=["TICKET","ENTER_FOREGROUND","ENTER_BACKGROUND"],rt=function(){function e(){O(this,e),this.channelClaimActionList=tt,this.noClaimActionList=nt,this.realTimeActionList=B.realTimeActionList,this.ticketInterval=60,this.requestTimeout=B.requestTimeout,this.loadConfig()}return x(e,[{key:"getChannelClaimActionList",value:function(){return this.channelClaimActionList}},{key:"getNoClaimActionList",value:function(){return this.noClaimActionList}},{key:"getRealTimeActionList",value:function(){return this.realTimeActionList}},{key:"getTicketInterval",value:function(){return this.ticketInterval}},{key:"getRequestTimeout",value:function(){return this.requestTimeout}},{key:"loadConfig",value:function(){var e=this;try{if("undefined"==typeof wx)return;var t=X.getSync(U);t&&this.updateConfig(t),ce({conf_name:"mini_game_sdk_common",conf_key:"config"}).then(function(t){t&&pe(t)&&(e.updateConfig(t),X.setSync(U,t))})}catch(t){console.error(t)}}},{key:"updateConfig",value:function(e){e.channelClaimActionList&&ve(e.channelClaimActionList)&&(this.channelClaimActionList=e.channelClaimActionList),e.noClaimActionList&&ve(e.noClaimActionList)&&(this.noClaimActionList=e.noClaimActionList),e.realTimeActionList&&ve(e.realTimeActionList)&&(this.realTimeActionList=e.realTimeActionList),e.ticketInterval&&"number"==typeof e.ticketInterval&&e.ticketInterval>1&&e.ticketInterval!==this.ticketInterval&&(this.ticketInterval=e.ticketInterval,Be.publish(Z)),e.requestTimeout&&"number"==typeof e.requestTimeout&&e.requestTimeout>5e3&&(this.requestTimeout=e.requestTimeout)}}]),e}(),ot=new rt,it=Ke,at=Ge,ut=We,ct=Je,st=function(){var e=!1,t=!1,n=!0,r=!0,o=!0,i=!1;return function(){if(!i){i=!0;var a=X.getSync(q);if((null==a?void 0:a.bg)===z?e=!0:(null==a?void 0:a.bg)===$&&(e=!1),(null==a?void 0:a.fg)===z?t=!0:(null==a?void 0:a.fg)===$&&(t=!1),(null==a?void 0:a.st)===z?n=!0:(null==a?void 0:a.st)===$&&(n=!1),(null==a?void 0:a.ti)===z?r=!0:(null==a?void 0:a.ti)===$&&(r=!1),Oe.devLog("当前缓存开关 bgOn,fgOn,stOn,tiOn:",e,t,n,r),n&&Be.publish(it),r){var u=function(){o&&Be.publish(at)},c=setInterval(u,1e3*ot.getTicketInterval());Be.subscribe(Z,function(){c&&clearInterval(c),c=setInterval(u,1e3*ot.getTicketInterval())})}wx.onShow(function(e){if(o=!0,t){var n="";try{(n=JSON.stringify(e)).length>1e4&&(n=JSON.stringify({cut:1,scene:e.scene}))}catch(e){}Be.publish(ut,{enter_options:n})}}),wx.onHide(function(){o=!1,e&&Be.publish(ct)})}}}(),lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt,pt=ft(function(){var e,t=null;function n(e){return!!e&&("object"==E(e)||"function"==typeof e)}function r(e){if(null!==e&&!n(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var o=Object,i=!(!o.create&&{__proto__:null}instanceof o),a=o.create||(i?function(e){return r(e),{__proto__:e}}:function(e){if(r(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var t=function(){};return t.prototype=e,new t}),u=function(){return null},c=o.getPrototypeOf||([].__proto__===Array.prototype?function(e){var t=e.__proto__;return n(t)?t:null}:u);return e=function(s,l){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!n(s)||!n(l))throw new TypeError("Cannot create proxy with a non-object as target or handler");var f=function(){};t=function(){s=null,f=function(e){throw new TypeError("Cannot perform '".concat(e,"' on a proxy that has been revoked"))}},setTimeout(function(){t=null},0);var d=l;for(var p in l={get:null,set:null,apply:null,construct:null},d){if(!(p in l))throw new TypeError("Proxy polyfill does not support trap '".concat(p,"'"));l[p]=d[p]}"function"==typeof d&&(l.apply=d.apply.bind(d));var v,h=c(s),g=!1,y=!1;"function"==typeof s?(v=function(){var e=this&&this.constructor===v,t=Array.prototype.slice.call(arguments);return f(e?"construct":"apply"),e&&l.construct?l.construct.call(this,s,t):!e&&l.apply?l.apply(s,this,t):e?(t.unshift(s),new(s.bind.apply(s,t))):s.apply(this,t)},g=!0):s instanceof Array?(v=[],y=!0):v=i||null!==h?a(h):{};var m=l.get?function(e){return f("get"),l.get(this,e,v)}:function(e){return f("get"),this[e]},_=l.set?function(e,t){f("set"),l.set(this,e,t,v)}:function(e,t){f("set"),this[e]=t},A=o.getOwnPropertyNames(s),k={};A.forEach(function(e){if(!g&&!y||!(e in v)){var t={enumerable:!!o.getOwnPropertyDescriptor(s,e).enumerable,get:m.bind(s,e),set:_.bind(s,e)};o.defineProperty(v,e,t),k[e]=!0}});var S=!0;if(g||y){var b=o.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return r(t),e.__proto__=t,e}:u);h&&b(v,h)||(S=!1)}if(l.get||!S)for(var T in s)k[T]||o.defineProperty(v,T,{get:m.bind(s,T)});return o.seal(s),o.seal(v),v},e.revocable=function(n,r){return{proxy:new e(n,r),revoke:t}},e}),vt={};try{dt||(dt=pt())}catch(N){_t(N)}function ht(e,t,n,r){try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,t,o){var i,a;r&&mt(function(){return r.apply(void 0,m(o))});var u=!!(null!=(i=o[0])&&i.success||null!=(a=o[0])&&a.fail);u&&["success","fail"].forEach(function(e){if(o[0][e])try{o[0][e]=new dt(o[0][e],{apply:function(t,r,i){return mt(function(){return n.apply(void 0,[e,o[0]].concat(m(i)))}),t.apply(r,i)}})}catch(e){_t(e)}});var c=e.apply(t,o);return!u&&c&&"[object Promise]"===Object.prototype.toString.call(c)?c.then(function(e){return mt(function(){return n("success",o[0],e)}),e}).catch(function(e){throw mt(function(){return n("fail",o[0],e)}),e}):c}})}catch(e){_t(e)}}function gt(e,t,n){try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,t,r){var o="function"==typeof r[0];if(o)try{r[0]=new dt(r[0],{apply:function(e,t,r){var o=e.call.apply(e,[t].concat(m(r)));return mt(function(){return n(o)}),o}})}catch(e){_t(e)}var i=e.call.apply(e,[t].concat(m(r)));return o||mt(function(){return n(i)}),i}})}catch(e){_t(e)}}function yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0;try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,i,a){var u=e.call.apply(e,[i].concat(m(a)));return(!n||!vt[t])&&(mt(function(){return null==o?void 0:o(u)}),r.forEach(function(e){var t=e.eventName,n=e.isAsync,r=e.proxyEvent;n?ht(u,t,r):gt(u,t,r)})),n&&(vt[t]=!0),u}})}catch(e){_t(e)}}function mt(e){try{e()}catch(e){_t(e)}}function _t(e){ae({log_type:J,message:null==e?void 0:e.message,err_stack:null==e?void 0:e.stack})}var At=He,kt=et,St=Qe,bt=Ye,Tt=ze,wt=$e,Rt=Xe,Et=Ze,Ot=function(){var e=!1;return function(){e||(e=!0,ht(wx,"login",function(e){"success"===e&&Be.publish(At)}),gt(wx,"onAddToFavorites",function(){Be.publish(kt)}),gt(wx,"onShareTimeline",function(){Be.publish(St,{target:"TIME_LINE",trigger:"MENU"})}),gt(wx,"onShareAppMessage",function(){Be.publish(St,{target:"APP_MESSAGE",trigger:"MENU"})}),gt(wx,"shareAppMessage",function(){Be.publish(St,{target:"APP_MESSAGE",trigger:"BUTTON"})}),yt(wx,"createGameClubButton",!1,[{isAsync:!1,eventName:"onTap",proxyEvent:function(){Be.publish(bt)}}],function(){Be.publish(Tt)}),yt(wx,"getGameServerManager",!0,[{isAsync:!0,eventName:"createRoom",proxyEvent:function(e){"success"===e&&Be.publish("CREATE_GAME_ROOM")}},{isAsync:!0,eventName:"joinRoom",proxyEvent:function(e){"success"===e&&Be.publish(wt)}}]),ht(wx,"requestMidasPayment",function(e,t){Be.publish(Et,{status:"success"===e?"SUCCESS":"FAIL",quantity:(null==t?void 0:t.buyQuantity)||0,mode:(null==t?void 0:t.mode)||"",platform:(null==t?void 0:t.platform)||"",no:(null==t?void 0:t.outTradeNo)||"",payType:"Midas"})},function(e){Be.publish(Rt,{quantity:(null==e?void 0:e.buyQuantity)||0,mode:(null==e?void 0:e.mode)||"",platform:(null==e?void 0:e.platform)||"",no:(null==e?void 0:e.outTradeNo)||"",payType:"Midas"})}),ht(wx,"requestMidasPaymentGameItem",function(e,t){var n=(t||{}).signData;Be.publish(Et,{status:"success"===e?"SUCCESS":"FAIL",quantity:(null==n?void 0:n.buyQuantity)||0,mode:(null==n?void 0:n.mode)||"",platform:(null==n?void 0:n.platform)||"",no:(null==n?void 0:n.outTradeNo)||"",p:(null==n?void 0:n.goodsPrice)||0,productId:(null==n?void 0:n.productId)||"",payType:"MidasGameItem"})},function(e){var t=(e||{}).signData;Be.publish(Rt,{quantity:(null==t?void 0:t.buyQuantity)||0,mode:(null==t?void 0:t.mode)||"",platform:(null==t?void 0:t.platform)||"",no:(null==t?void 0:t.outTradeNo)||"",p:(null==t?void 0:t.goodsPrice)||0,productId:(null==t?void 0:t.productId)||"",payType:"MidasGameItem"})}))}}(),It=function(){function e(){O(this,e)}return x(e,null,[{key:"isEmpty",value:function(e){return null==e||"string"==typeof e&&""===e.trim()}},{key:"format",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.replace(/\${(\d+)}/g,function(e,t){return n[t]})}},{key:"customStringify",value:function(e){var t=[];try{return JSON.stringify(e,function(e,n){if(void 0===n)return"undefined";if("object"==E(n)&&null!==n){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return"bigint"==typeof n?n.toString():n})}catch(e){return"[Param Error]"}}}]),e}(),xt=/^([a-zA-Z][a-zA-Z\d_]{0,63})$/i,Ct=/^ams_reserved_(.*)/i,Nt=function(){function e(){O(this,e)}return x(e,null,[{key:"validateActionType",value:function(t){return It.isEmpty(t)?(Oe.error(e.ERROR_ACTION_TYPE_NULL),!1):!!xt.test(t)||(Oe.error(e.ERROR_ACTION_TYPE_INVALID),!1)}},{key:"validateActionParam",value:function(t){if(!t)return!0;if(!pe(t))return Oe.error(e.ERROR_ACTION_PARAM_IS_NOT_OBJECT),!1;for(var n in t){if(It.isEmpty(n))return Oe.error(e.ERROR_ACTION_PARAM_KEY_NULL),!1;if(!xt.test(n))return Oe.error(e.ERROR_ACTION_PARAM_KEY_INVALID),!1;Ct.test(n)&&Oe.warn(e.WARN_ACTION_PARAM_KEY_RESERVED);var r=t[n];if(!e.isValidValue(r))return Oe.error(It.format(e.ERROR_ACTION_PARAM_VALUE_INVALID,n,r)),!1;if(ve(r)){if(!e.isValidArrayValue(r)){for(var o=0;o<r.length;o++)Oe.error(It.format(e.ERROR_ACTION_PARAM_VALUE_ARRAY_INVALID,n,It.customStringify(r),o,r[o]));return!1}if(!e.checkArrayElementTypes(r))return Oe.error(e.ERROR_ACTION_PARAM_VALUE_ARRAY_TYPE_UNUNIQUE),!1}}return!0}},{key:"isValidValue",value:function(e){return null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||ve(e)}},{key:"isValidArrayValue",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n)return!1}return!0}},{key:"checkArrayElementTypes",value:function(e){if(!e||e.length<=1)return!0;for(var t=E(e[0]),n=1;n<e.length;n++)if(E(e[n])!==t)return!1;return!0}}]),e}(),Pt=Nt;Pt.ERROR_ACTION_TYPE_NULL="在track方法中,action_type参数不能为空!",Pt.ERROR_ACTION_TYPE_INVALID="在track方法中,action_type参数只能包含字母、数字和下划线,且只能以字母开头,长度不能超过64个字符!",Pt.ERROR_ACTION_PARAM_KEY_NULL="在track方法中,action_param参数的key不能为空!",Pt.ERROR_ACTION_PARAM_KEY_INVALID="在track方法中,action_param参数的key只能包含字母、数字和下划线,且不能以数字开头,长度不能超过64个字符!",Pt.WARN_ACTION_PARAM_KEY_RESERVED="SDK内部预留参数的key均以'ams_reserved_'开头,该参数的值会被SDK内部覆盖,请不要使用!",Pt.ERROR_ACTION_PARAM_VALUE_INVALID="在track方法中,action_param参数的value必须是String/Number/Boolean/Array中的一种![key=${0}, value=${1}]",Pt.ERROR_ACTION_PARAM_VALUE_ARRAY_INVALID="在track方法中,如果action_param参数中的某个元素的value是Array,那么这个Array中的每个元素必须是String/Number/Boolean中的一种![key=${0}, value=${1}, 数组的第${2}个元素为${3}]",Pt.ERROR_ACTION_PARAM_VALUE_ARRAY_TYPE_UNUNIQUE="在track方法中,如果action_param参数中的某个元素的value是Array,那么这个Array中所有元素的类型必须是同一种!",Pt.ERROR_ACTION_PARAM_IS_NOT_OBJECT="action_param 参数不是Object";var Lt={exports:{}};!function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,o,i,a){return n(function(e,t){return e<<t|e>>>32-t}(n(n(t,e),n(o,a)),i),r)}function o(e,t,n,o,i,a,u){return r(t&n|~t&o,e,t,i,a,u)}function i(e,t,n,o,i,a,u){return r(t&o|n&~o,e,t,i,a,u)}function a(e,t,n,o,i,a,u){return r(t^n^o,e,t,i,a,u)}function u(e,t,n,o,i,a,u){return r(n^(t|~o),e,t,i,a,u)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var r,c,s,l,f,d=1732584193,p=-271733879,v=-1732584194,h=271733878;for(r=0;r<e.length;r+=16)c=d,s=p,l=v,f=h,d=o(d,p,v,h,e[r],7,-680876936),h=o(h,d,p,v,e[r+1],12,-389564586),v=o(v,h,d,p,e[r+2],17,606105819),p=o(p,v,h,d,e[r+3],22,-1044525330),d=o(d,p,v,h,e[r+4],7,-176418897),h=o(h,d,p,v,e[r+5],12,1200080426),v=o(v,h,d,p,e[r+6],17,-1473231341),p=o(p,v,h,d,e[r+7],22,-45705983),d=o(d,p,v,h,e[r+8],7,1770035416),h=o(h,d,p,v,e[r+9],12,-1958414417),v=o(v,h,d,p,e[r+10],17,-42063),p=o(p,v,h,d,e[r+11],22,-1990404162),d=o(d,p,v,h,e[r+12],7,1804603682),h=o(h,d,p,v,e[r+13],12,-40341101),v=o(v,h,d,p,e[r+14],17,-1502002290),d=i(d,p=o(p,v,h,d,e[r+15],22,1236535329),v,h,e[r+1],5,-165796510),h=i(h,d,p,v,e[r+6],9,-1069501632),v=i(v,h,d,p,e[r+11],14,643717713),p=i(p,v,h,d,e[r],20,-373897302),d=i(d,p,v,h,e[r+5],5,-701558691),h=i(h,d,p,v,e[r+10],9,38016083),v=i(v,h,d,p,e[r+15],14,-660478335),p=i(p,v,h,d,e[r+4],20,-405537848),d=i(d,p,v,h,e[r+9],5,568446438),h=i(h,d,p,v,e[r+14],9,-1019803690),v=i(v,h,d,p,e[r+3],14,-187363961),p=i(p,v,h,d,e[r+8],20,1163531501),d=i(d,p,v,h,e[r+13],5,-1444681467),h=i(h,d,p,v,e[r+2],9,-51403784),v=i(v,h,d,p,e[r+7],14,1735328473),d=a(d,p=i(p,v,h,d,e[r+12],20,-1926607734),v,h,e[r+5],4,-378558),h=a(h,d,p,v,e[r+8],11,-2022574463),v=a(v,h,d,p,e[r+11],16,1839030562),p=a(p,v,h,d,e[r+14],23,-35309556),d=a(d,p,v,h,e[r+1],4,-1530992060),h=a(h,d,p,v,e[r+4],11,1272893353),v=a(v,h,d,p,e[r+7],16,-155497632),p=a(p,v,h,d,e[r+10],23,-1094730640),d=a(d,p,v,h,e[r+13],4,681279174),h=a(h,d,p,v,e[r],11,-358537222),v=a(v,h,d,p,e[r+3],16,-722521979),p=a(p,v,h,d,e[r+6],23,76029189),d=a(d,p,v,h,e[r+9],4,-640364487),h=a(h,d,p,v,e[r+12],11,-421815835),v=a(v,h,d,p,e[r+15],16,530742520),d=u(d,p=a(p,v,h,d,e[r+2],23,-995338651),v,h,e[r],6,-198630844),h=u(h,d,p,v,e[r+7],10,1126891415),v=u(v,h,d,p,e[r+14],15,-1416354905),p=u(p,v,h,d,e[r+5],21,-57434055),d=u(d,p,v,h,e[r+12],6,1700485571),h=u(h,d,p,v,e[r+3],10,-1894986606),v=u(v,h,d,p,e[r+10],15,-1051523),p=u(p,v,h,d,e[r+1],21,-2054922799),d=u(d,p,v,h,e[r+8],6,1873313359),h=u(h,d,p,v,e[r+15],10,-30611744),v=u(v,h,d,p,e[r+6],15,-1560198380),p=u(p,v,h,d,e[r+13],21,1309151649),d=u(d,p,v,h,e[r+4],6,-145523070),h=u(h,d,p,v,e[r+11],10,-1120210379),v=u(v,h,d,p,e[r+2],15,718787259),p=u(p,v,h,d,e[r+9],21,-343485551),d=n(d,c),p=n(p,s),v=n(v,l),h=n(h,f);return[d,p,v,h]}function s(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function l(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function f(e){var t,n,r="0123456789abcdef",o="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),o+=r.charAt(t>>>4&15)+r.charAt(15&t);return o}function d(e){return unescape(encodeURIComponent(e))}function p(e){return function(e){return s(c(l(e),8*e.length))}(d(e))}function v(e,t){return function(e,t){var n,r,o=l(e),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=c(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],a[n]=1549556828^o[n];return r=c(i.concat(l(t)),512+8*t.length),s(c(a.concat(r),640))}(d(e),d(t))}function h(e,t,n){return t?n?v(t,e):function(e,t){return f(v(e,t))}(t,e):n?p(e):function(e){return f(p(e))}(e)}e.exports?e.exports=h:t.md5=h}(lt)}(Lt);var Mt=ft(Lt.exports),Dt="function"==typeof btoa,qt="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;var Ut,jt="function"==typeof TextEncoder?new TextEncoder:void 0,Ft=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");Ut={},Ft.forEach(function(e,t){return Ut[e]=t});var Bt=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);var Vt=Dt?function(e){return btoa(e)}:qt?function(e){return Buffer.from(e,"binary").toString("base64")}:function(e){for(var t,n,r,o,i="",a=e.length%3,u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(r=e.charCodeAt(u++))>255||(o=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");i+=Ft[(t=n<<16|r<<8|o)>>18&63]+Ft[t>>12&63]+Ft[t>>6&63]+Ft[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},Kt=qt?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(Bt.apply(null,e.subarray(n,n+4096)));return Vt(t.join(""))},Gt=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Bt(192|t>>>6)+Bt(128|63&t):Bt(224|t>>>12&15)+Bt(128|t>>>6&63)+Bt(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Bt(240|t>>>18&7)+Bt(128|t>>>12&63)+Bt(128|t>>>6&63)+Bt(128|63&t)},Wt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Jt=qt?function(e){return Buffer.from(e,"utf8").toString("base64")}:jt?function(e){return Kt(jt.encode(e))}:function(e){return Vt(function(e){return e.replace(Wt,Gt)}(e))},Ht=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Yt=function(e,t,n,r){for(var o,i=r>1?void 0:r?Qt(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ht(t,n,i),i},zt=function(){function e(t){var n=this;O(this,e),this.cgiBatchSize=B.cgiBatchSize,this.reportThreshold=B.reportThreshold,this.reportDelay=B.reportDelay,this.triggerExecuteSend=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[];return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return clearTimeout(t),t=setTimeout(function(){var t=e.apply(void 0,i);r.forEach(function(e){return e(t)}),r=[]},n),new Promise(function(e){return r.push(e)})}}(function(){n.executeSend()},1e3*this.reportDelay),this.inspectDelay=B.inspectDelay,this.inspectTimer=void 0,this.isNeedContinueSend=!1,this.getBaseInfo=t.getBaseInfo,this.reportLog=t.reportLog,this.queueManager=t.queueManager,this.configManager=t.configManager,this.onReportComplete=t.onReportComplete,this.onReportFail=t.onReportFail,this.flushSend(),this.startInspectTimer()}return x(e,[{key:"batchSend",value:function(){var e,t=this.queueManager.getReportableActions(this.reportThreshold);if(t.length>=this.reportThreshold)this.executeSend();else{var n=(null==(e=this.configManager)?void 0:e.getRealTimeActionList())||B.realTimeActionList;t.some(function(e){return n.indexOf(e.action_type)>-1&&!e.is_retry})?this.executeSend():this.triggerExecuteSend()}this.startInspectTimer()}},{key:"flushSend",value:function(){this.executeSend()}},{key:"executeSend",value:function(){var t=this;if(e.currentRequestCount>=e.requestConcurrency)this.isNeedContinueSend=!0;else{this.isNeedContinueSend=!1;var n=(e.requestConcurrency-e.currentRequestCount)*this.cgiBatchSize,r=this.queueManager.getReportableActions(n),o=this.getBaseInfo();if(!o.openid&&!o.unionid&&(Oe.warn("请尽快调用 setOpenId 或 setUnionId 方法设置用户ID!"),r=r.filter(function(e){return null==e?void 0:e.ad_trace_id})),!(r.length<=0)){n<this.queueManager.getReportableActionsLength()&&(this.isNeedContinueSend=!0),e.currentRequestCount+=Math.ceil(r.length/this.cgiBatchSize);for(var i=[],a=0;a<r.length;a+=this.cgiBatchSize){var u=this.generateActionReportParams(r.slice(a,a+this.cgiBatchSize));i.push(this.report(u))}Promise.all(i).then(function(e){var n=e.some(function(e){return e>=0});t.isNeedContinueSend&&n&&t.executeSend()}).catch(function(e){Oe.error(e),t.reportLog({message:"executeSend catch: ".concat(e.message),log_type:V,err_stack:e.stack})})}}}},{key:"generateActionReportParams",value:function(e){var t=[],n=[],r=this.getBaseInfo();return e.forEach(function(e){n.push(e.action_id);var r=Object.assign({},e);delete r.inner_status,t.push(r)}),{data:{info:r,actions:t},actionIdList:n}}},{key:"dealSuccessData",value:function(e,t,n){[51001,51003].indexOf(null==e?void 0:e.code)>-1?this.queueManager.updateActionsForReportFail(t):this.queueManager.removeActions(t),0!==(null==e?void 0:e.code)&&(this.reportLog({log_type:K,code:null==e?void 0:e.code,message:"trace_id: ".concat(null==e?void 0:e.trace_id,",msg: ").concat(null==e?void 0:e.message)}),Oe.error("上报失败:",e)),this.doTrackCallbackFn(this.onReportComplete,e,n),-1===[0,51001,51003].indexOf(null==e?void 0:e.code)&&this.doTrackCallbackFn(this.onReportFail,e,n)}},{key:"dealFailData",value:function(e,t,n){this.queueManager.updateActionsForReportFail(t),this.reportLog({log_type:K,code:e.code,message:e.message}),Oe.error("上报失败:",e),this.doTrackCallbackFn(this.onReportComplete,e,n)}},{key:"report",value:function(t){var n=this,r=t.data,o=t.actionIdList;return this.queueManager.updateActionsForReporting(o),Oe.debug&&(Oe.info("上报行为类型: ","【".concat(r.actions.map(function(e){return e.action_type}).join("、"),"】")),Oe.info("上报请求参数: ",r)),new Promise(function(t){var i,a,u,c,s,l,f,d,p=Date.now();try{var v=function(e){var t="",n=null==e?void 0:e.appid,r=null==e?void 0:e.secret_key,o=null==e?void 0:e.sdk_version,i=null==e?void 0:e.timestamp;if(!(n&&r&&o&&i&&32===r.length))return t;for(var a=Mt(o+n+i),u=0;u<32;u++)t+=u%2==0?r[u]:a[u];return t}({appid:null==(i=null==r?void 0:r.info)?void 0:i.appid,secret_key:null==(a=null==r?void 0:r.info)?void 0:a.secret_key,sdk_version:null==(u=null==r?void 0:r.info)?void 0:u.sdk_version,timestamp:p}),h=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})}(Jt(e)):Jt(e)}(JSON.stringify(r));f={"Client-Time":p,"Sign-Value":Mt(h+(null==(c=null==r?void 0:r.info)?void 0:c.user_action_set_id)+(null==(s=null==r?void 0:r.info)?void 0:s.secret_key)+v),"Sign-Version":B.signVersion,"content-type":"text/plain;charset=UTF-8"},d=h}catch(v){f={"Client-Time":p},d=r,n.reportLog({log_type:Q,message:"sign error msg: ".concat(null==v?void 0:v.message),err_stack:null==v?void 0:v.stack}),Oe.error(v)}wx.request({url:"https://api.datanexus.qq.com/data-nexus-cgi/miniprogram",method:"POST",timeout:(null==(l=n.configManager)?void 0:l.getRequestTimeout())||B.requestTimeout,header:f,data:d,success:function(i){var a,u;Oe.devLog("上报接口返回码:",null==(a=null==i?void 0:i.data)?void 0:a.code);var c=(null==(u=null==i?void 0:i.header)?void 0:u["Server-Time"])||-1;if(ue.revise(c),e.currentRequestCount-=1,200===(null==i?void 0:i.statusCode))return n.dealSuccessData(null==i?void 0:i.data,o,r),void t((null==i?void 0:i.data).code);var s="";try{s="object"==E(null==i?void 0:i.data)?JSON.stringify(null==i?void 0:i.data):null==i?void 0:i.data}catch(e){Oe.error(e)}var l={code:"number"==typeof(null==i?void 0:i.statusCode)?-1*i.statusCode:-888,message:"statusCode: ".concat(null==i?void 0:i.statusCode,", data: ").concat(s)};n.dealFailData(l,o,r),t(l.code)},fail:function(i){Oe.devLog("上报失败:",i),e.currentRequestCount-=1;var a={code:"number"==typeof(null==i?void 0:i.errno)?-1*i.errno:-999,message:null==i?void 0:i.errMsg};n.dealFailData(a,o,r),t(a.code)}})})}},{key:"startInspectTimer",value:function(){var t=this;clearTimeout(this.inspectTimer),this.inspectTimer=setTimeout(function(){e.currentRequestCount>=e.requestConcurrency&&(e.currentRequestCount=e.requestConcurrency-1),t.executeSend(),t.startInspectTimer()},1e3*this.inspectDelay)}},{key:"doTrackCallbackFn",value:function(e,t,n){if("function"==typeof e)try{for(var r=[],o=0;o<n.actions.length;o++)if(!n.actions[o].is_sdk_auto_track){var i=n.actions[o],a=i.action_type,u=i.action_param,c=i.action_id,s=i.action_time;r.push({action_type:a,action_param:u,action_id:c,action_time:s})}if(r.length){var l=n.info,f=l.user_action_set_id,d=l.appid,p=l.openid,v=l.unionid,h=l.user_unique_id;e({code:null==t?void 0:t.code,message:null==t?void 0:t.message,data:{actions:r,info:{user_action_set_id:f,appid:d,openid:p,unionid:v,user_unique_id:h}}})}}catch(r){Oe.error("返回上报回调数据异常:",r)}}}],[{key:"setRequestConcurrency",value:function(t){"number"==typeof t?t<1?Oe.error("网络请求最大并发量不能小于1"):t>10?Oe.error("网络请求最大并发量不能大于10"):e.requestConcurrency=t:Oe.error("网络请求最大并发量需设置为数字")}}]),e}(),$t=zt;$t.currentRequestCount=0,$t.requestConcurrency=B.requestConcurrency,Yt([xe],$t.prototype,"batchSend",1),Yt([xe],$t.prototype,"flushSend",1),Yt([xe],$t.prototype,"executeSend",1);var Zt=Ke,Xt=Ge,en=We,tn=Je,nn=He,rn=et,on=Qe,an=Ye,un=ze,cn=$e,sn=Xe,ln=Ze,fn=function(){function e(){O(this,e)}return x(e,[{key:"install",value:function(e,t){var n=function(t){Be.subscribe(t,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.track(t,Object.assign(n||{},o,y(y({},Tn,!0),wn,r)))}}(t))};n(Xt),n(Zt),n(en),n(tn),"all"===t&&(n(nn),n(rn),n(on),n(un),n(an),n("CREATE_GAME_ROOM"),n(cn),n(sn),n(ln))}}]),e}(),dn=function(){function e(){O(this,e),this.special_method_symbol=Symbol("special_method_symbol")}return x(e,[{key:"onPurchase",value:function(e){return"number"!=typeof e&&Oe.warn("付费金额需要为数字"),e<=0&&Oe.warn("付费金额需要大于0"),this.wrapTrack("PURCHASE",{value:e})}},{key:"onEnterForeground",value:function(){return this.wrapTrack("ENTER_FOREGROUND")}},{key:"onEnterBackground",value:function(){return this.wrapTrack("ENTER_BACKGROUND")}},{key:"onAppStart",value:function(){return this.wrapTrack("START_APP")}},{key:"onAppQuit",value:function(){return this.wrapTrack("APP_QUIT")}},{key:"onAddToWishlist",value:function(){return this.wrapTrack("ADD_TO_WISHLIST")}},{key:"wrapTrack",value:function(e,t){return this.track(e,Object.assign(t||{},y({},this.special_method_symbol,1)))}}]),e}(),pn=function(){k(t,dn);var e=b(t);function t(){return O(this,t),e.apply(this,arguments)}return x(t,[{key:"onRegister",value:function(){return this.wrapTrack("REGISTER")}},{key:"onCreateRole",value:function(e){return e&&"string"!=typeof e&&Oe.warn("角色名称需要为字符串"),this.wrapTrack("CREATE_ROLE",e?{name:e}:{})}},{key:"onTutorialFinish",value:function(){return this.wrapTrack("TUTORIAL_FINISH")}}]),t}(),vn="(如果确认无误,请忽略该提示)",hn=function(){var e=[];return{requestActionList:function(){try{ce({conf_name:"data_nexus_common",conf_key:"action_types"}).then(function(t){ve(t)&&(e=t)})}catch(e){Oe.error(e)}},getActionList:function(){return e}}}();function gn(e,t){try{e.is_sdk_auto_track||(function(e){try{var t=hn.getActionList();if(!t.includes(e)){var n,r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(yn(o,e)<=parseInt((.3*o.length).toString())){Oe.warn("通过SDK上报的".concat(e,"行为名称可能有误,请检查该行为类型是否为腾讯广告提供的标准行为!").concat(vn));break}}}catch(e){r.e(e)}finally{r.f()}}}catch(t){Oe.error(t)}}(e.action_type),"minigame"===t?function(e,t){var n,r,o;try{["PURCHASE","ADD_TO_CART"].includes(e.action_type)&&e.action_param&&we(e.action_param,"value")&&("number"!=typeof(null==(n=e.action_param)?void 0:n.value)?Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数需要为数字!")):(null==(r=e.action_param)?void 0:r.value)<=0?Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数需要大于0!")):"minigame"===t&&(null==(o=e.action_param)?void 0:o.value)<100&&Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数可能有误,金额的单位为‘分’,请检查金额是否正确!").concat(vn)))}catch(e){Oe.error(e)}}(e,t):"miniprogram"===t&&function(e){try{var t=null==e?void 0:e.action_type,n=(null==e?void 0:e.action_param)||{};"PURCHASE"===t&&we(n,"value")&&("number"!=typeof(null==n?void 0:n.value)?Oe.warn("通过SDK上报的".concat(t,"行为携带的金额参数需要为数字!")):(null==n?void 0:n.value)<=0&&Oe.warn("通过SDK上报的".concat(t,"行为携带的金额参数需要大于0!")))}catch(t){Oe.error(t)}}(e))}catch(e){Oe.error(e)}}function yn(e,t){try{if(0===e.length)return t.length;if(0===t.length)return e.length;for(var n=[],r=0;r<=t.length;r++)n[r]=[r];for(var o=0;o<=e.length;o++)n[0][o]=o;for(var i=1;i<=t.length;i++)for(var a=1;a<=e.length;a++)t.charAt(i-1)===e.charAt(a-1)?n[i][a]=n[i-1][a-1]:n[i][a]=Math.min(n[i-1][a-1]+1,n[i][a-1]+1,n[i-1][a]+1);return n[t.length][e.length]}catch(n){Oe.error(n)}}function mn(e){try{e&&!/^[a-zA-Z0-9_\-]+$/.test(e)&&Oe.warn("通过SDK上报的openid:".concat(e,"可能有误,请检查openid是否正确!").concat(vn))}catch(e){Oe.error(e)}}var _n,An=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,Sn=function(e,t,n,r){for(var o,i=r>1?void 0:r?kn(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&An(t,n,i),i},bn=Symbol("initializedInstance"),Tn=Symbol("autoTrack"),wn=Symbol("actionTime"),Rn=function(){k(t,pn);var e=b(t);function t(n){var r;if(O(this,t),(r=e.call(this)).env="production",r.sdk_version="1.5.5",r.sdk_name="@dn-sdk/minigame",r.deviceInfo={},r.gameInfo={},r.session_id="",r.log_id=0,r.inited=!1,r.initErrMsg="",null==wx||!wx.createCanvas)return r.initErrMsg="不支持非微信小游戏中使用",Oe.error(r.initErrMsg),T(r);var o=Te();if(t[bn].length>=o.maxSdkInstance)return r.initErrMsg="初始化超过上限",Oe.error(r.initErrMsg),T(r);var i=function(e){return pe(e)?(function(e){var t=["user_action_set_id","secret_key","appid","openid","unionid","user_unique_id","auto_track","auto_attr","on_report_fail","on_report_complete"];for(var n in e)t.includes(n)||Oe.warn("Invalid property '".concat(n,"' found in config"))}(e),"number"!=typeof e.user_action_set_id?"user_action_set_id 参数需为 number 类型":e.user_action_set_id<=0?"user_action_set_id 参数需大于 0":"string"!=typeof e.secret_key?"secret_key 参数需为 string 类型":""===e.secret_key.trim()?"缺少 secret_key 参数":32!==e.secret_key.length?"secret_key 参数需为 32 位字符串":"string"!=typeof e.appid?"appid 参数需为 string 类型":""!==e.appid.trim()||"缺少 appid"):"初始化参数需为 object 类型"}(n),a=oe();if(!0!==i)return r.initErrMsg=i,Oe.error(i),T(r);var u=null==a?void 0:a.appId;if(u&&u!==n.appid)return r.initErrMsg="初始化传入的appid与当前小游戏appid不一致",Oe.error(r.initErrMsg),T(r);r.config=n,we(n,"auto_track")||(r.config.auto_track=be("autoTrack")),r.openid=n.openid,r.unionid=n.unionid,r.user_unique_id=n.user_unique_id,r.onReportComplete=n.on_report_complete,r.onReportFail=n.on_report_fail,r.saveValidOpenidToStorage();var c=n.user_action_set_id;return t[bn].includes(c)?(r.initErrMsg="同个数据源[".concat(c,"]只能初始化一次"),Oe.error(r.initErrMsg),r.reportLog({log_type:V,message:r.initErrMsg}),T(r)):(r.reportLog=r.reportLog.bind(w(r)),r.getTrackBaseInfo=r.getTrackBaseInfo.bind(w(r)),r.deviceInfo=ee(),r.gameInfo=Ie(),r.session_id=ye(),r.queueManage=new Ue({userActionSetId:c,maxLength:o.maxQueueLength,ogEvents:Ve}),r.actionReporter=new $t({getBaseInfo:r.getTrackBaseInfo,reportLog:r.reportLog,queueManager:r.queueManage,configManager:ot,onReportComplete:r.onReportComplete,onReportFail:r.onReportFail}),r.inited=!0,t[bn].push(c),r.useAutoTrack(),r.doReportOnEnterBackground(),"release"===(null==a?void 0:a.envVersion)?(Oe.info("初始化成功"),T(r)):(function(e){var t=e.sdk_version,n=e.default_download_url,r=e.fail_handler;ce({conf_name:e.conf_name,conf_key:e.conf_key}).then(function(e){if(pe(e)){var o=null==e?void 0:e.blackVersions,i=null==e?void 0:e.minVersion,a=null==e?void 0:e.bestVersion,u=null==e?void 0:e.downloadUrl,c=n;return u&&/^https/.test(u)&&(c=u),ve(o)&&(null==o?void 0:o.indexOf(t))>-1?(null==r||r(),void Oe.error("初始化失败!当前SDK版本存在兼容问题,请尽快升级至最新版!下载地址:".concat(c))):i&&Se(t,i)<0?(null==r||r(),void Oe.error("初始化失败!当前SDK版本过低,请尽快升级至最新版!下载地址:".concat(c))):(a&&Se(t,a)<0&&Oe.warn("新版本SDK已上线,强烈建议您升级至最新版,尽早享受新特性!下载地址:".concat(c)),void Oe.info("初始化成功"))}Oe.info("初始化成功")}).catch(function(){Oe.info("初始化成功")})}({conf_name:"mini_game_sdk_common",conf_key:"version",sdk_version:r.sdk_version,default_download_url:"https://sr-home-1257214331.cos.ap-guangzhou.myqcloud.com/sdk/dn-sdk-minigame/dn-sdk-minigame.zip",fail_handler:function(){r.inited=!1}}),hn.requestActionList(),mn(n.openid),T(r)))}return x(t,[{key:"getInitResult",value:function(){return{inited:this.inited,initErrMsg:this.initErrMsg}}},{key:"track",value:function(e,t){var n,r;if(!this.inited||!this.queueManage)return Oe.error("上报失败,请先完成初始化"),{code:100,message:"未完成初始化或重复初始化导致初始化失败,请先完成初始化"};var o=Pt.validateActionType(e),i=Pt.validateActionParam(t);if(o&&i){!this.openid&&!this.unionid&&Oe.warn("缺少 openid 或 unionid");var a=be("actionParamMaxLength");if(JSON.stringify(t||{}).length>a)return Oe.error("监测到超过".concat(a,"的上报日志:").concat(e," ").concat(t)),{code:102,message:"action_param 参数过大,不能超过 ".concat(a," 字符")};var u=!(null==t||!t[Tn]),c=this.createAction(e,t||{},u);"release"!==(null==(n=oe())?void 0:n.envVersion)&&gn(c,"minigame");var s=this.queueManage.addAction(c);return null==(r=this.actionReporter)||r.batchSend(),s}return{code:101,message:"action_type 或 action_param 参数错误"}}},{key:"flush",value:function(){var e;null==(e=this.actionReporter)||e.flushSend()}},{key:"setOpenId",value:function(e){var t;if(e&&"string"==typeof e)return this.openid=e,this.gameInfo.ad_trace_id&&!X.getSync(j)&&Be.publish("START_APP"),this.flush(),this.saveValidOpenidToStorage(),"release"!==(null==(t=oe())?void 0:t.envVersion)&&mn(e),{code:0,message:"成功"};var n="openid 格式错误";return Oe.error(n),{code:101,message:n}}},{key:"setUnionId",value:function(e){if(e&&"string"==typeof e)return this.unionid=e,this.flush(),{code:0,message:"成功"};var t="unionid 格式错误";return Oe.error(t),{code:101,message:t}}},{key:"setUserUniqueId",value:function(e){if(e&&"string"==typeof e)return this.user_unique_id=e,{code:0,message:"成功"};var t="user_unique_id 格式错误";return Oe.error(t),{code:101,message:t}}},{key:"doReportOnEnterBackground",value:function(){var e=this;wx.onHide(function(){var t,n;null==(t=e.actionReporter)||t.flushSend(),null==(n=e.queueManage)||n.reportLostNum()})}},{key:"getTrackBaseInfo",value:function(){var e=oe();return Object.assign({},this.deviceInfo,function(e){var t={};return["user_action_set_id","appid","openid","secret_key","user_unique_id","unionid"].forEach(function(n){we(e,n)&&(t[n]=e[n])}),t}(this.config),{local_id:te(),sdk_name:this.sdk_name,sdk_version:this.sdk_version,openid:this.openid||re(),unionid:this.unionid,user_unique_id:this.user_unique_id,inner_param:{app_env_version:e.envVersion,app_version:e.version}})}},{key:"createAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null!=t&&t[Tn]&&delete t[Tn];var r=Date.now();null!=t&&t[wn]&&(r=null==t?void 0:t[wn],delete t[wn]);var o={action_id:ye(),action_param:t,action_time:r,action_type:e,is_retry:!1,is_sdk_auto_track:n,retry_count:0,revised_action_time:ue.getRevisedcurrentTimeMillis(),log_id:++this.log_id,session_id:this.session_id,pkg_channel_id:this.gameInfo.pkg_channel_id,source_scene:this.gameInfo.source_scene,network_type:ne(),ad_trace_id:this.gameInfo.ad_trace_id,channel:this.getChannelByActionType(e)};return null!=t&&t[this.special_method_symbol]&&(this.addActionInnerParam(o,"is_special_method",!0),delete t[this.special_method_symbol]),ot.getChannelClaimActionList().indexOf(e)>-1&&this.gameInfo.launch_options&&this.addActionInnerParam(o,"launch_options",this.gameInfo.launch_options),o}},{key:"addActionInnerParam",value:function(e,t,n){e.inner_param&&pe(e.inner_param)?e.inner_param[t]=n:e.inner_param=y({},t,n)}},{key:"getChannelByActionType",value:function(e){var t="";return ot.getChannelClaimActionList().indexOf(e)>-1?t=this.gameInfo.channel||"":ot.getNoClaimActionList().indexOf(e)>-1&&(t="UNKNOWN"),t}},{key:"reportLog",value:function(e){var t,n,r={user_action_set_id:null==(t=this.config)?void 0:t.user_action_set_id,appid:null==(n=this.config)?void 0:n.appid,session_id:this.session_id};ae(Object.assign(r,e))}},{key:"useAutoTrack",value:function(){var e;if(null!=(e=this.config)&&e.auto_track){var t=!0,n=X.getSync(q);(null==n?void 0:n.ap)===z?t=!0:(null==n?void 0:n.ap)===$&&(t=!1),"devtools"===ee().wx_platform&&(t=!0),(new fn).install(this,t?"all":"lifecycle"),st(),t&&Ot(),this.getAutoProxyRemoteConfig()}}},{key:"getAutoProxyRemoteConfig",value:function(){var e,t,n=ee();n.os&&n.os_version&&null!=(e=this.config)&&e.user_action_set_id&&function(e){return new Promise(function(t){wx.request({method:"POST",url:"https://api.datanexus.qq.com/data-nexus-config/v1/sdk/minigame/get",data:e,timeout:B.requestTimeout,success:function(e){se(e,t,"minigame/get"),fe(e)},fail:function(e){le(e,"minigame/get")}})})}({conf_name:"MG",conf_param:{user_action_set_id:null==(t=this.config)?void 0:t.user_action_set_id,sdk_version:this.sdk_version,os_type:(null==n?void 0:n.os)||"",os_version:Re(n.os_version),device_brand:(null==n?void 0:n.device_brand)||"",weixin_lib_version:(null==n?void 0:n.wx_lib_version)||"",weixin_version:(null==n?void 0:n.wx_version)||""}}).then(function(e){pe(e)&&X.setSync(q,e)})}},{key:"saveValidOpenidToStorage",value:function(){this.openid&&function(e){return/^[a-zA-Z0-9_-]{28,30}$/.test(e)}(this.openid)&&X.setSync(j,this.openid)}}],[{key:"setRequestConcurrency",value:function(e){$t.setRequestConcurrency(e)}},{key:"setDebug",value:function(e){Oe.debug=e}}]),t}(),En=Rn;En[bn]=[],Sn([xe],En.prototype,"track",1),Sn([xe,function(e,t,n){var r=n.value;return n.value=function(){if(this.inited){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}Oe.error("上报失败,请先完成初始化")},n}],En.prototype,"flush",1),Sn([xe],En.prototype,"setOpenId",1),Sn([xe],En.prototype,"setUnionId",1),Sn([xe],En.prototype,"setUserUniqueId",1),Sn([xe],En.prototype,"doReportOnEnterBackground",1),Sn([xe],En.prototype,"getTrackBaseInfo",1),Sn([xe],En.prototype,"useAutoTrack",1);var On=0,In={moid:""},xn=!1,Cn=JSON.stringify(wx.getLaunchOptionsSync()||""),Nn={token:"",uid:"",uname:"",openid:""},Pn={partner_id:"",game_id:"",pkg_name:"",version:""},Ln={doid:"",dsid:"",dsname:"",dext:"",drid:"",drname:"",drlevel:"",dmoney:"",money:""},Mn="wx-adapter sdk >>>>>>>:";wx.hideShareMenu(),wx.onShow(function(e){e.query&&(Cn=JSON.stringify(e))});var Dn=function(e){var t=n(n({},v()),d),r=l(n(n(n(n(n({},Ln),Nn),Pn),t),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgamemds/index/",r).then(function(t){t.state&&(t.data.balance>=e?Un(""):qn(t.data))}).catch(function(e){console.log(e)})},qn=function(e){wx.requestMidasPayment({mode:"game",env:e.env,offerId:e.offerId,currencyType:e.currencyType,platform:e.platform,buyQuantity:e.buyQuantity,outTradeNo:In.moid}).then(function(t){_n&&_n.onPurchase(100*e.buyQuantity),Un(t)}).catch(function(e){console.log(e)})},Un=function(e){var t;On++;var r=n(n({},v()),d);t=l(e?n(n(n(n(n(n({},Ln),Pn),Nn),r),In),{},{res:JSON.stringify(e),launchoption:Cn,onshow:Cn}):n(n(n(n(n(n({},Ln),Pn),Nn),In),r),{},{launchoption:Cn,onshow:Cn})),c(u,"/wxgamemds/send/",t).then(function(e){console.log(e)}).catch(function(t){console.log(t),On<3&&setTimeout(function(){Un(e)},1e3)})},jn=function(e){return new Promise(function(t,n){if(!e)return n({state:100001,msg:"激活入参缺失"});if(null==e||!e.wx)return n({state:100002,msg:"激活入参 wx 属性缺失"});var r=e.wx,o=r.game_id,i=r.version,a=r.dn_sdk_id,u=r.dn_secret_key;if(!o)return n({state:100003,msg:"激活入参 game_id 属性缺失"});Pn.game_id=o,Pn.version=i,Pn.pkg_name="wxgame",Pn.partner_id=4,xn=!0,console.log("active 激活成功!"),a&&u&&function(e){var t=e.dn_sdk_id,n=e.dn_secret_key,r=e.app_id,o=(_n=new En({appid:r,secret_key:n,user_action_set_id:t})).getInitResult();null!=o&&o.inited||console.error("dnSdk init failed: ",o.initErrMsg),_n.onAppStart(),wx.onAddToFavorites(function(e){console.log(Mn+"click onAddToFavorites"),_n&&_n.track("DD_TO_WISHLIST",{type:"default"})}),wx.onShareAppMessage(function(){console.log(Mn+"click onShareAppMessage"),_n&&_n.track("SHARE",{target:"APP_MESSAGE"})}),wx.onShareTimeline(function(){console.log(Mn+"click onShareTimeline"),_n&&_n.track("SHARE",{target:"TIME_LINE"})}),console.log(Mn+"广点通初始化成功!")}(wx),t()})},Fn=function(){return new Promise(function(e,t){if(!xn)return t({state:100003,msg:"登录前请先激活"});wx.login({success:function(r){var o=l(n(n(n({code:r.code},Pn),g()),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgamelogin/initlogin/",o).then(function(n){if(1==n.state){var r=n.data,o=r.token,i=r.uid,u=r.uname,c=r.openid,s=r.show_page;if(Nn.token=o,Nn.uid=i,Nn.uname=u,Nn.openid=c,e({token:o,uid:i,uname:u,partner_id:4,show_page:s}),console.log(Mn+"登录成功"),c&&_n){var l=n||{},f=l.backFlowDay,d=l.isRegisterUser;!function(e){var t=e.openid,n=e.nsSdk,r=e.backFlowDay,o=e.isRegisterUser;if(n.setOpenId(t),o)return n.onRegister();if(!r)return n.track("RE_ACTIVE");var i=r>=30?30:r>=14?14:r>=7?7:void 0;n.track("RE_ACTIVE",i?{backFlowDay:i}:{})}({openid:c,nsSdk:_n,backFlowDay:f,isRegisterUser:d})}}else a(n.msg),t({state:n.state,msg:n.msg})}).catch(function(e){a(e),t({state:100001,msg:e})})},fail:function(e){t({state:100002,msg:e})}})})},Bn=function(){return new Promise(function(e,t){wx.getSetting({success:function(n){n.authSetting["scope.userInfo"]?wx.getUserInfo({success:function(t){return e(t.userInfo)},fail:function(e){return t({state:100001,msg:JSON.stringify(e)})}}):wx.getUserProfile({desc:"获取用户信息",success:function(t){return e(t.userInfo)},fail:function(e){return t({state:100002,msg:JSON.stringify(e)})}})}})})},Vn=function(e){return new Promise(function(t,r){var o=Nn||{},i=o.token,s=o.uid,p=o.uname;if(!(xn&&i&&s&&p))return a("失败!请先激活登录"),r({state:100001,msg:"未激活或未登录,请重新进入游戏"});wx.showLoading({title:"加载中"});var y=e.dmoney;(Ln=f(e)||{}).money=y;var m=l(n(n(n(n(n({},e),Pn),Nn),n(n(n({},v()),h()),d)),{},{money:y,launchoption:Cn,onshow:Cn}));c(u,"/wxgameorder/index/",m).then(function(e){var n=e||{},o=n.state,i=n.msg,s=n.data,f=void 0===s?{}:s;if(1==o){var d=f.aid,p=f.moid,v=f.thumb_url;In.moid=p,1==d?(Dn(y),t({msg:"ok"})):2==d?wx.showModal({title:"支付提示",content:"即将打开充值入口,输入“充值”或点击右下角卡片即可充值。",showCancel:!1,confirmText:"点我充值",success:function(e){e.confirm?wx.openCustomerServiceConversation({sessionFrom:p,sendMessagePath:"/path/index/index?moid="+p,showMessageCard:!0,sendMessageImg:v,success:function(e){console.log("openCustomerServiceConversation success",e),t()},fail:function(e){console.error("openCustomerServiceConversation fail ",e),r({state:100003,msg:"支付失败"})},complete:function(e){console.log("openCustomerServiceConversation compelte: ",p),function(e){var t=g(),n=l({partner_id:Pn.partner_id,pkg_name:Pn.pkg_name,game_id:Pn.game_id,uid:Nn.uid,openid:Nn.openid,token:Nn.token,uname:Nn.uname,duid:t.duid,moid:e});c(u,"/wxgameorder/get/",n).then(function(e){1==e.data.status&&_n.onPurchase(100*e.data.money)})}(p)}}):(a("用户取消支付"),r({state:100005,msg:"取消支付"}))},fail:function(){a("用户取消支付"),r({state:100006,msg:"支付失败"})}}):(a("失败!设备未识别"),r({state:100004,msg:"支付失败"}))}else a(i),r({state:o,msg:i});wx.hideLoading()}).catch(function(e){a(e),r({state:100002,msg:"支付失败"}),wx.hideLoading()})})},Kn=function(e){return new Promise(function(t,r){var o=Nn||{},i=o.token,s=o.uid,f=o.uname;if(!(xn&&i&&s&&f))return a("未激活或未登录,请重新进入游戏"),r({state:100001,msg:"未激活或未登录,请检查"});var p=l(n(n(n(n(n({},e),Nn),Pn),n(n({},v()),d)),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgameevent/index/",p).then(function(){t(),_n&&("create"===p.event&&_n.onCreateRole(p.drname),"levelup"===p.event&&_n.track("UPDATE_LEVEL",{level:p.drlevel,power:0}))}).catch(function(e){console.log(e),r({state:100002,msg:"角色上报失败"})})})},Gn=function(e){wx.shareAppMessage(),Kn(n(n({},f(e)),{},{event:"fxclick"}))},Wn=function(e){wx.openCustomerServiceConversation({success:function(){Kn(n(n({},f(e)),{},{event:"kfclick"}))}})},Jn=function(e){return new Promise(function(t,r){var o=l(n(n(n(n(n({},e),Pn),Nn),g()),{},{launchoption:Cn,onshow:Cn,partner_id:4}));c(u,"/wxgamesafe/verify/",o).then(function(e){var n=e.data,o=n.code,i=n.msg;1==o?t():r({state:100001,msg:i})}).catch(function(e){r({state:100002,msg:e})})})},Hn=function(e){return new Promise(function(t,n){_n?(_n.track("VIEW_CONTENT",{item:e}),t()):n({state:100001,msg:"上报失败!广点通 sdk 未初始化"})})},Qn=function(e){return new Promise(function(t,n){var r=!1,o=wx.createInterstitialAd({adUnitId:e});o.onError(function(e){r=!0}),o.load().then(function(){if(!r)return o.show();n({state:100001,msg:"广告加载后发生错误"})}).then(t).catch(function(e){return n({state:100002,msg:JSON.stringify(e)})}),o.onClose(function(e){console.log("广告关闭:",e.isEnded?"正常播放完成":"用户提前关闭")})})},Yn=function(e){var t=null,n=!1,r=!1,o=function(){return n||r?Promise.resolve():(n=!0,new Promise(function(o,i){(t=wx.createRewardedVideoAd({adUnitId:e})).onError(function(e){n=!1,r=!1,t=null,i({state:100004,msg:"广告平台异常",originalErr:e})}),t.load().then(function(){r=!0,n=!1,o()}).catch(function(e){console.log(399),n=!1,r=!1,t=null,i(e)})}))},i=function(){return r?new Promise(function(e,n){t?(t.onClose(function(e){console.log("广告关闭:",e.isEnded?"正常播放完成":"用户提前关闭")}),t.show().then(function(){console.log("激励视频广告展示成功"),e()}).catch(function(e){r=!1,n({state:100003,msg:JSON.stringify(e)})})):n({state:100002,msg:"广告实例不存在"})}):o().then(i).catch(function(e){return Promise.reject({state:100001,msg:JSON.stringify(e)})})};return{preload:o,show:i}};export{jn as jf_active,Yn as jf_createRewardedVideoAd,Wn as jf_customerService,Bn as jf_getUserInfo,Fn as jf_login,Vn as jf_pay,Jn as jf_profanityCheck,Gn as jf_share,Qn as jf_showInterstitialAd,Kn as jf_trace,Hn as jf_tracePageView};
package/index.d.ts ADDED
@@ -0,0 +1,232 @@
1
+ declare module "jf-gamekit" {
2
+ // ====================== 激活 jf_active ======================
3
+ /**
4
+ * 激活配置项
5
+ */
6
+ interface ActiveConfig {
7
+ /** 游戏ID */
8
+ game_id: string
9
+ /** 小游戏 ID */
10
+ app_id: string
11
+ /** 游戏版本号 */
12
+ version?: string
13
+ /** 广点通 ID */
14
+ dn_sdk_id?: number
15
+ /** 广点通秘钥 */
16
+ dn_secret_key?: string
17
+ }
18
+
19
+ /**
20
+ * 平台激活配置,至少需要传入 wx 或 tt 中的一个
21
+ */
22
+ interface JfActiveConfig {
23
+ wx?: ActiveConfig, // 微信小游戏配置
24
+ tt?: ActiveConfig // 抖音小游戏配置
25
+ }
26
+
27
+
28
+ /**
29
+ * 发起激活流程
30
+ * @param config 平台配置对象
31
+ * @returns Promise<void> 操作完成后 resolve
32
+ */
33
+ export const jf_active: (config: JfActiveConfig) => Promise<void>
34
+
35
+
36
+
37
+ // ====================== 登录 jf_login ======================
38
+ /**
39
+ * 发起游戏登录流程
40
+ * @returns Promise<void> 操作完成后 resolve
41
+ */
42
+ export const jf_login: () => Promise<void>
43
+
44
+
45
+
46
+ // ====================== 获取用户信息 jf_getUserInfo ======================
47
+ /**
48
+ * 获取用户信息
49
+ * @returns Promise<void> 操作完成后 resolve
50
+ */
51
+ export const jf_getUserInfo: () => Promise<void>
52
+
53
+
54
+
55
+
56
+ // ====================== 支付 jf_pay ======================
57
+ /**
58
+ * 支付配置项
59
+ */
60
+ interface PayConfig {
61
+ /** CP订单ID */
62
+ doid: string
63
+ /** CP游戏服ID( 标识 ) */
64
+ dsid: string
65
+ /** CP金额(定额) */
66
+ dmoney: number
67
+ /** 服务器名字 */
68
+ dsname?: string
69
+ /** CP扩展回调参数,225字符 */
70
+ dext?: string
71
+ /** CP角色ID */
72
+ drid?: string
73
+ /** CP角色名 */
74
+ drname?: string
75
+ /** CP角色等级 */
76
+ drlevel?: number
77
+ }
78
+
79
+
80
+ /**
81
+ * 支付
82
+ * @param config 支付配置项
83
+ * @returns Promise<void> 操作完成后 resolve
84
+ */
85
+ export const jf_pay: (config: PayConfig) => Promise<void>
86
+
87
+
88
+
89
+ // ====================== 事件上报 jf_trace ======================
90
+ /**
91
+ * 事件上报配置项
92
+ */
93
+ interface TraceConfig {
94
+ /** CP游戏服ID( 标识 ) */
95
+ dsid: string
96
+ /** 事件类型:create-创建角色;enter-进入游戏;levelup-角色升级 */
97
+ event: string
98
+ /** 服务器名字 */
99
+ dsname?: string
100
+ /** CP角色ID */
101
+ drid?: string
102
+ /** CP角色名 */
103
+ drname?: string
104
+ /** CP角色等级 */
105
+ drlevel?: number
106
+ }
107
+
108
+
109
+ /**
110
+ * 事件上报
111
+ * @param config 事件上报配置项
112
+ * @returns Promise<void> 操作完成后 resolve
113
+ */
114
+ export const jf_trace: (config: TraceConfig) => Promise<void>
115
+
116
+
117
+
118
+ // ====================== 分享 jf_share ======================
119
+ /**
120
+ * 分享配置项
121
+ */
122
+ interface ShareConfig {
123
+ /** CP游戏服ID( 标识 ) */
124
+ dsid: string
125
+ /** 服务器名字 */
126
+ dsname?: string
127
+ /** CP角色ID */
128
+ drid?: string
129
+ /** CP角色名 */
130
+ drname?: string
131
+ /** CP角色等级 */
132
+ drlevel?: number
133
+ }
134
+
135
+
136
+ /**
137
+ * 分享
138
+ * @param config 分享配置项
139
+ */
140
+ export const jf_share: (config: ShareConfig) => void
141
+
142
+
143
+
144
+ // ====================== 唤起客服 jf_customerService ======================
145
+ /**
146
+ * 客服配置项
147
+ */
148
+ interface CustomerServiceConfig {
149
+ /** CP游戏服ID( 标识 ) */
150
+ dsid: string
151
+ /** 服务器名字 */
152
+ dsname?: string
153
+ /** CP角色ID */
154
+ drid?: string
155
+ /** CP角色名 */
156
+ drname?: string
157
+ /** CP角色等级 */
158
+ drlevel?: number
159
+ }
160
+
161
+
162
+ /**
163
+ * 唤起客服
164
+ * @param config 唤起客服配置项
165
+ */
166
+ export const jf_customerService: (config: CustomerServiceConfig) => void
167
+
168
+
169
+
170
+
171
+ // ====================== 敏感词校验 jf_profanityCheck ======================
172
+ /**
173
+ * 敏感词校验配置项
174
+ */
175
+ interface ProfanityCheckConfig {
176
+ /** 游戏ID */
177
+ game_id: string
178
+ /** 游戏版本号 */
179
+ version?: string
180
+ /** 校验内容 */
181
+ content: string
182
+ /** 校验文本类型枚举值 */
183
+ scene: number
184
+ }
185
+
186
+
187
+ /**
188
+ * 敏感词校验:用户创角、发布言等交互场景时使用
189
+ * @param config 敏感词校验配置项
190
+ * @returns Promise<void> 操作完成后 resolve
191
+ */
192
+ export const jf_profanityCheck: (config: ProfanityCheckConfig) => Promise<void>
193
+
194
+
195
+
196
+ // ====================== 插屏广告 jf_showInterstitialAd ======================
197
+ /**
198
+ * 插屏广告
199
+ * @param adUnitId 广告ID
200
+ * @returns Promise<void> 操作完成后 resolve
201
+ */
202
+ export const jf_showInterstitialAd: (adUnitId: string) => Promise<void>
203
+
204
+
205
+
206
+ // ====================== 浏览商城页、活动页时数据上报 jf_tracePageView ======================
207
+ /**
208
+ * 浏览商城页、活动页时数据上报
209
+ * @param content - Mall 浏览商城页面;Activity 浏览器活动页面
210
+ * @returns Promise<void> 操作完成后 resolve
211
+ */
212
+ export const jf_tracePageView: (content: string) => Promise<void>
213
+
214
+
215
+
216
+ // ====================== 激励视频广告 jf_createRewardedVideoAd ======================
217
+ /**
218
+ * 激励视频广告操作方法
219
+ */
220
+ interface CreateRewardedVideoAdMethods {
221
+ preload: () => Promise<void> // 预加载广告
222
+ show: () => Promise<void> // 展示广告
223
+ }
224
+
225
+
226
+ /**
227
+ * 激励视频广告
228
+ * @param adUnitId 广告ID
229
+ * @returns 返回包含预加载和展示方法的对象
230
+ */
231
+ export const jf_createRewardedVideoAd: (adUnitId: string) => CreateRewardedVideoAdMethods
232
+ }
package/index.es.js ADDED
@@ -0,0 +1,14 @@
1
+ // esm 入口:由 package.json 中 module 指定
2
+
3
+ import * as ttSDK from './es/wxSdk';
4
+ import * as wxSDK from './es/ttSdk';
5
+
6
+ let SDK = ''
7
+
8
+ if (!!wx) {
9
+ SDK = wxSDK
10
+ } else if (!!tt) {
11
+ SDK = ttSDK
12
+ }
13
+
14
+ export default SDK;
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ // commonjs 入口:由 package.json 中 main 指定
2
+
3
+ if (!!wx) {
4
+ module.exports = require('./lib/wxSdk')
5
+ }
6
+ else if (!!tt) {
7
+ module.exports = require('./lib/ttSdk')
8
+ }
package/lib/ttSdk.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";function t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach(function(e){t(r,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))})}return r}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={exports:{}};var c,a={exports:{}};function u(){return c||(c=1,a.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==o&&o.crypto&&(r=o.crypto),!r)try{r=require("crypto")}catch(t){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},c=s.lib={},a=c.Base={extend:function(t){var e=i(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)}},u=c.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,o=t.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;e[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var c=0;c<o;c+=4)e[n+c>>>2]=r[c>>>2];return this.sigBytes+=o,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=a.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(n());return new u.init(e,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).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 u.init(r,e/2)}},l=f.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}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 u.init(r,e)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=c.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,o=n.words,i=n.sigBytes,s=this.blockSize,c=i/(4*s),a=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,f=t.min(4*a,i);if(a){for(var h=0;h<a;h+=s)this._doProcessBlock(o,h);r=o.splice(0,a),n.sigBytes-=f}return new u.init(r,f)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});c.Hasher=p.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.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 v.HMAC.init(t,r).finalize(e)}}});var v=s.algo={};return s}(Math);return t}()),a.exports}var f,h={exports:{}};function l(){return f||(f=1,h.exports=function(t){return n=(r=t).lib,o=n.Base,i=n.WordArray,(s=r.x64={}).Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=o.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],n=0;n<e;n++){var o=t[n];r.push(o.high),r.push(o.low)}return i.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}}),t;var e,r,n,o,i,s}(u())),h.exports}var d,p={exports:{}};function v(){return d||(d=1,p.exports=function(t){return function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,r=e.init,n=e.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 e=t.byteLength,n=[],o=0;o<e;o++)n[o>>>2]|=t[o]<<24-o%4*8;r.call(this,n,e)}else r.apply(this,arguments)};n.prototype=e}}(),t.lib.WordArray}(u())),p.exports}var y,g={exports:{}};function _(){return y||(y=1,g.exports=function(t){return function(){var e=t,r=e.lib.WordArray,n=e.enc;function o(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o+=2){var i=e[o>>>2]>>>16-o%4*8&65535;n.push(String.fromCharCode(i))}return n.join("")},parse:function(t){for(var e=t.length,n=[],o=0;o<e;o++)n[o>>>1]|=t.charCodeAt(o)<<16-o%2*16;return r.create(n,2*e)}},n.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i+=2){var s=o(e[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>1]|=o(t.charCodeAt(i)<<16-i%2*16);return r.create(n,2*e)}}}(),t.enc.Utf16}(u())),g.exports}var m,x={exports:{}};function w(){return m||(m=1,x.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var o=[],i=0,s=0;s<e;s++)if(s%4){var c=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=c<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var o=[],i=0;i<r;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;c<4&&i+.75*c<r;c++)o.push(n.charAt(s>>>6*(3-c)&63));var a=n.charAt(64);if(a)for(;o.length%4;)o.push(a);return o.join("")},parse:function(t){var e=t.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var c=t.indexOf(s);-1!==c&&(e=c)}return n(t,e,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(u())),x.exports}var B,k={exports:{}};function b(){return B||(B=1,k.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var o=[],i=0,s=0;s<e;s++)if(s%4){var c=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=c<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var r=t.words,n=t.sigBytes,o=e?this._safe_map:this._map;t.clamp();for(var i=[],s=0;s<n;s+=3)for(var c=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<n;a++)i.push(o.charAt(c>>>6*(3-a)&63));var u=o.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t,e){void 0===e&&(e=!0);var r=t.length,o=e?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s<o.length;s++)i[o.charCodeAt(s)]=s}var c=o.charAt(64);if(c){var a=t.indexOf(c);-1!==a&&(r=a)}return n(t,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),t.enc.Base64url}(u())),k.exports}var S,A={exports:{}};function C(){return S||(S=1,A.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.algo,c=[];!function(){for(var t=0;t<64;t++)c[t]=4294967296*e.abs(e.sin(t+1))|0}();var a=s.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,s=t[e+0],a=t[e+1],d=t[e+2],p=t[e+3],v=t[e+4],y=t[e+5],g=t[e+6],_=t[e+7],m=t[e+8],x=t[e+9],w=t[e+10],B=t[e+11],k=t[e+12],b=t[e+13],S=t[e+14],A=t[e+15],C=i[0],H=i[1],z=i[2],P=i[3];C=u(C,H,z,P,s,7,c[0]),P=u(P,C,H,z,a,12,c[1]),z=u(z,P,C,H,d,17,c[2]),H=u(H,z,P,C,p,22,c[3]),C=u(C,H,z,P,v,7,c[4]),P=u(P,C,H,z,y,12,c[5]),z=u(z,P,C,H,g,17,c[6]),H=u(H,z,P,C,_,22,c[7]),C=u(C,H,z,P,m,7,c[8]),P=u(P,C,H,z,x,12,c[9]),z=u(z,P,C,H,w,17,c[10]),H=u(H,z,P,C,B,22,c[11]),C=u(C,H,z,P,k,7,c[12]),P=u(P,C,H,z,b,12,c[13]),z=u(z,P,C,H,S,17,c[14]),C=f(C,H=u(H,z,P,C,A,22,c[15]),z,P,a,5,c[16]),P=f(P,C,H,z,g,9,c[17]),z=f(z,P,C,H,B,14,c[18]),H=f(H,z,P,C,s,20,c[19]),C=f(C,H,z,P,y,5,c[20]),P=f(P,C,H,z,w,9,c[21]),z=f(z,P,C,H,A,14,c[22]),H=f(H,z,P,C,v,20,c[23]),C=f(C,H,z,P,x,5,c[24]),P=f(P,C,H,z,S,9,c[25]),z=f(z,P,C,H,p,14,c[26]),H=f(H,z,P,C,m,20,c[27]),C=f(C,H,z,P,b,5,c[28]),P=f(P,C,H,z,d,9,c[29]),z=f(z,P,C,H,_,14,c[30]),C=h(C,H=f(H,z,P,C,k,20,c[31]),z,P,y,4,c[32]),P=h(P,C,H,z,m,11,c[33]),z=h(z,P,C,H,B,16,c[34]),H=h(H,z,P,C,S,23,c[35]),C=h(C,H,z,P,a,4,c[36]),P=h(P,C,H,z,v,11,c[37]),z=h(z,P,C,H,_,16,c[38]),H=h(H,z,P,C,w,23,c[39]),C=h(C,H,z,P,b,4,c[40]),P=h(P,C,H,z,s,11,c[41]),z=h(z,P,C,H,p,16,c[42]),H=h(H,z,P,C,g,23,c[43]),C=h(C,H,z,P,x,4,c[44]),P=h(P,C,H,z,k,11,c[45]),z=h(z,P,C,H,A,16,c[46]),C=l(C,H=h(H,z,P,C,d,23,c[47]),z,P,s,6,c[48]),P=l(P,C,H,z,_,10,c[49]),z=l(z,P,C,H,S,15,c[50]),H=l(H,z,P,C,y,21,c[51]),C=l(C,H,z,P,k,6,c[52]),P=l(P,C,H,z,p,10,c[53]),z=l(z,P,C,H,w,15,c[54]),H=l(H,z,P,C,a,21,c[55]),C=l(C,H,z,P,m,6,c[56]),P=l(P,C,H,z,A,10,c[57]),z=l(z,P,C,H,g,15,c[58]),H=l(H,z,P,C,b,21,c[59]),C=l(C,H,z,P,v,6,c[60]),P=l(P,C,H,z,B,10,c[61]),z=l(z,P,C,H,d,15,c[62]),H=l(H,z,P,C,x,21,c[63]),i[0]=i[0]+C|0,i[1]=i[1]+H|0,i[2]=i[2]+z|0,i[3]=i[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;r[o>>>5]|=128<<24-o%32;var i=e.floor(n/4294967296),s=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,u=0;u<4;u++){var f=a[u];a[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return c},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,r,n,o,i,s){var c=t+(e&r|~e&n)+o+s;return(c<<i|c>>>32-i)+e}function f(t,e,r,n,o,i,s){var c=t+(e&n|r&~n)+o+s;return(c<<i|c>>>32-i)+e}function h(t,e,r,n,o,i,s){var c=t+(e^r^n)+o+s;return(c<<i|c>>>32-i)+e}function l(t,e,r,n,o,i,s){var c=t+(r^(e|~n))+o+s;return(c<<i|c>>>32-i)+e}r.MD5=i._createHelper(a),r.HmacMD5=i._createHmacHelper(a)}(Math),t.MD5}(u())),A.exports}var H,z={exports:{}};function P(){return H||(H=1,z.exports=function(t){return r=(e=t).lib,n=r.WordArray,o=r.Hasher,i=e.algo,s=[],c=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],c=r[3],a=r[4],u=0;u<80;u++){if(u<16)s[u]=0|t[e+u];else{var f=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=f<<1|f>>>31}var h=(n<<5|n>>>27)+a+s[u];h+=u<20?1518500249+(o&i|~o&c):u<40?1859775393+(o^i^c):u<60?(o&i|o&c|i&c)-1894007588:(o^i^c)-899497514,a=c,c=i,i=o<<30|o>>>2,o=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+c|0,r[4]=r[4]+a|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=o.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=o._createHelper(c),e.HmacSHA1=o._createHmacHelper(c),t.SHA1;var e,r,n,o,i,s,c}(u())),z.exports}var D,E={exports:{}};function R(){return D||(D=1,E.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.algo,c=[],a=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(c[o]=r(e.pow(n,.5))),a[o]=r(e.pow(n,1/3)),o++),n++}();var u=[],f=s.SHA256=i.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],s=r[3],c=r[4],f=r[5],h=r[6],l=r[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var p=u[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,y=u[d-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;u[d]=v+u[d-7]+g+u[d-16]}var _=n&o^n&i^o&i,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),x=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&f^~c&h)+a[d]+u[d];l=h,h=f,f=c,c=s+x|0,s=i,i=o,o=n,n=x+(m+_)|0}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0,r[5]=r[5]+f|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;return r[o>>>5]|=128<<24-o%32,r[14+(o+64>>>9<<4)]=e.floor(n/4294967296),r[15+(o+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA256=i._createHelper(f),r.HmacSHA256=i._createHmacHelper(f)}(Math),t.SHA256}(u())),E.exports}var O,M={exports:{}};var j,F={exports:{}};function I(){return j||(j=1,F.exports=function(t){return function(){var e=t,r=e.lib.Hasher,n=e.x64,o=n.Word,i=n.WordArray,s=e.algo;function c(){return o.create.apply(o,arguments)}var a=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=c()}();var f=s.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],s=r[3],c=r[4],f=r[5],h=r[6],l=r[7],d=n.high,p=n.low,v=o.high,y=o.low,g=i.high,_=i.low,m=s.high,x=s.low,w=c.high,B=c.low,k=f.high,b=f.low,S=h.high,A=h.low,C=l.high,H=l.low,z=d,P=p,D=v,E=y,R=g,O=_,M=m,j=x,F=w,I=B,W=k,T=b,U=S,N=A,K=C,L=H,X=0;X<80;X++){var J,q,Q=u[X];if(X<16)q=Q.high=0|t[e+2*X],J=Q.low=0|t[e+2*X+1];else{var Z=u[X-15],G=Z.high,V=Z.low,Y=(G>>>1|V<<31)^(G>>>8|V<<24)^G>>>7,$=(V>>>1|G<<31)^(V>>>8|G<<24)^(V>>>7|G<<25),tt=u[X-2],et=tt.high,rt=tt.low,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,ot=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),it=u[X-7],st=it.high,ct=it.low,at=u[X-16],ut=at.high,ft=at.low;q=(q=(q=Y+st+((J=$+ct)>>>0<$>>>0?1:0))+nt+((J+=ot)>>>0<ot>>>0?1:0))+ut+((J+=ft)>>>0<ft>>>0?1:0),Q.high=q,Q.low=J}var ht,lt=F&W^~F&U,dt=I&T^~I&N,pt=z&D^z&R^D&R,vt=P&E^P&O^E&O,yt=(z>>>28|P<<4)^(z<<30|P>>>2)^(z<<25|P>>>7),gt=(P>>>28|z<<4)^(P<<30|z>>>2)^(P<<25|z>>>7),_t=(F>>>14|I<<18)^(F>>>18|I<<14)^(F<<23|I>>>9),mt=(I>>>14|F<<18)^(I>>>18|F<<14)^(I<<23|F>>>9),xt=a[X],wt=xt.high,Bt=xt.low,kt=K+_t+((ht=L+mt)>>>0<L>>>0?1:0),bt=gt+vt;K=U,L=N,U=W,N=T,W=F,T=I,F=M+(kt=(kt=(kt=kt+lt+((ht+=dt)>>>0<dt>>>0?1:0))+wt+((ht+=Bt)>>>0<Bt>>>0?1:0))+q+((ht+=J)>>>0<J>>>0?1:0))+((I=j+ht|0)>>>0<j>>>0?1:0)|0,M=R,j=O,R=D,O=E,D=z,E=P,z=kt+(yt+pt+(bt>>>0<gt>>>0?1:0))+((P=ht+bt|0)>>>0<ht>>>0?1:0)|0}p=n.low=p+P,n.high=d+z+(p>>>0<P>>>0?1:0),y=o.low=y+E,o.high=v+D+(y>>>0<E>>>0?1:0),_=i.low=_+O,i.high=g+R+(_>>>0<O>>>0?1:0),x=s.low=x+j,s.high=m+M+(x>>>0<j>>>0?1:0),B=c.low=B+I,c.high=w+F+(B>>>0<I>>>0?1:0),b=f.low=b+T,f.high=k+W+(b>>>0<T>>>0?1:0),A=h.low=A+N,h.high=S+U+(A>>>0<N>>>0?1:0),H=l.low=H+L,l.high=C+K+(H>>>0<L>>>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=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=r._createHelper(f),e.HmacSHA512=r._createHmacHelper(f)}(),t.SHA512}(u(),l())),F.exports}var W,T={exports:{}};var U,N={exports:{}};function K(){return U||(U=1,N.exports=function(t){return function(e){var r=t,n=r.lib,o=n.WordArray,i=n.Hasher,s=r.x64.Word,c=r.algo,a=[],u=[],f=[];!function(){for(var t=1,e=0,r=0;r<24;r++){a[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++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var o=1,i=0;i<24;i++){for(var c=0,h=0,l=0;l<7;l++){if(1&o){var d=(1<<l)-1;d<32?h^=1<<d:c^=1<<d-32}128&o?o=o<<1^113:o<<=1}f[i]=s.create(c,h)}}();var h=[];!function(){for(var t=0;t<25;t++)h[t]=s.create()}();var l=c.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,n=this.blockSize/2,o=0;o<n;o++){var i=t[e+2*o],s=t[e+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(H=r[o]).high^=s,H.low^=i}for(var c=0;c<24;c++){for(var l=0;l<5;l++){for(var d=0,p=0,v=0;v<5;v++)d^=(H=r[l+5*v]).high,p^=H.low;var y=h[l];y.high=d,y.low=p}for(l=0;l<5;l++){var g=h[(l+4)%5],_=h[(l+1)%5],m=_.high,x=_.low;for(d=g.high^(m<<1|x>>>31),p=g.low^(x<<1|m>>>31),v=0;v<5;v++)(H=r[l+5*v]).high^=d,H.low^=p}for(var w=1;w<25;w++){var B=(H=r[w]).high,k=H.low,b=a[w];b<32?(d=B<<b|k>>>32-b,p=k<<b|B>>>32-b):(d=k<<b-32|B>>>64-b,p=B<<b-32|k>>>64-b);var S=h[u[w]];S.high=d,S.low=p}var A=h[0],C=r[0];for(A.high=C.high,A.low=C.low,l=0;l<5;l++)for(v=0;v<5;v++){var H=r[w=l+5*v],z=h[w],P=h[(l+1)%5+5*v],D=h[(l+2)%5+5*v];H.high=z.high^~P.high&D.high,H.low=z.low^~P.low&D.low}H=r[0];var E=f[c];H.high^=E.high,H.low^=E.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,i=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,u=[],f=0;f<a;f++){var h=s[f],l=h.high,d=h.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u.push(d),u.push(l)}return new o.init(u,c)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});r.SHA3=i._createHelper(l),r.HmacSHA3=i._createHmacHelper(l)}(Math),t.SHA3}(u(),l())),N.exports}var L,X={exports:{}};var J,q={exports:{}};function Q(){return J||(J=1,q.exports=function(t){var e,r,n;r=(e=t).lib.Base,n=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=n.parse(e));var r=t.blockSize,o=4*r;e.sigBytes>o&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),c=i.words,a=s.words,u=0;u<r;u++)c[u]^=1549556828,a[u]^=909522486;i.sigBytes=s.sigBytes=o,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))}})}(u())),q.exports}var Z,G={exports:{}};var V,Y={exports:{}};function $(){return V||(V=1,Y.exports=function(t){return r=(e=t).lib,n=r.Base,o=r.WordArray,i=e.algo,s=i.MD5,c=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,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(),s=o.create(),c=s.words,a=n.keySize,u=n.iterations;c.length<a;){r&&i.update(r),r=i.update(t).finalize(e),i.reset();for(var f=1;f<u;f++)r=i.finalize(r),i.reset();s.concat(r)}return s.sigBytes=4*a,s}}),e.EvpKDF=function(t,e,r){return c.create(r).compute(t,e)},t.EvpKDF;var e,r,n,o,i,s,c}(u(),P(),Q())),Y.exports}var et,rt={exports:{}};function nt(){return et||(et=1,rt.exports=function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,o=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,c=r.enc;c.Utf8;var a=c.Base64,u=r.algo.EvpKDF,f=n.Cipher=s.extend({cfg:o.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(){s.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?m:g}return function(e){return{encrypt:function(r,n,o){return t(n).encrypt(e,r,n,o)},decrypt:function(r,n,o){return t(n).decrypt(e,r,n,o)}}}}()});n.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=r.mode={},l=n.BlockCipherMode=o.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}}),d=h.CBC=function(){var t=l.extend();function r(t,r,n){var o,i=this._iv;i?(o=i,this._iv=e):o=this._prevBlock;for(var s=0;s<n;s++)t[r+s]^=o[s]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize;r.call(this,t,e,o),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+o)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize,i=t.slice(e,e+o);n.decryptBlock(t,e),r.call(this,t,e,o),this._prevBlock=i}}),t}(),p=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,o=n<<24|n<<16|n<<8|n,s=[],c=0;c<n;c+=4)s.push(o);var a=i.create(s,n);t.concat(a)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:p}),reset:function(){var t;f.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});var v=n.CipherParams=o.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(a)},parse:function(t){var e,r=a.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=n.SerializableCipher=o.extend({cfg:o.extend({format:y}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var o=t.createEncryptor(r,n),i=o.finalize(e),s=o.cfg;return v.create({ciphertext:i,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.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}}),_=(r.kdf={}).OpenSSL={execute:function(t,e,r,n,o){if(n||(n=i.random(8)),o)s=u.create({keySize:e+r,hasher:o}).compute(t,n);else var s=u.create({keySize:e+r}).compute(t,n);var c=i.create(s.words.slice(e),4*r);return s.sigBytes=4*e,v.create({key:s,iv:c,salt:n})}},m=n.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:_}),encrypt:function(t,e,r,n){var o=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=o.iv;var i=g.encrypt.call(this,t,e,o.key,n);return i.mixIn(o),i},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var o=n.kdf.execute(r,t.keySize,t.ivSize,e.salt,n.hasher);return n.iv=o.iv,g.decrypt.call(this,t,e,o.key,n)}})}()}(u(),$())),rt.exports}var ot,it={exports:{}};function st(){return ot||(ot=1,it.exports=function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function r(t,e,r,n){var o,i=this._iv;i?(o=i.slice(0),this._iv=void 0):o=this._prevBlock,n.encryptBlock(o,0);for(var s=0;s<r;s++)t[e+s]^=o[s]}return e.Encryptor=e.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize;r.call(this,t,e,o,n),this._prevBlock=t.slice(e,e+o)}}),e.Decryptor=e.extend({processBlock:function(t,e){var n=this._cipher,o=n.blockSize,i=t.slice(e,e+o);r.call(this,t,e,o,n),this._prevBlock=i}}),e}(),t.mode.CFB}(u(),nt())),it.exports}var ct,at={exports:{}};function ut(){return ct||(ct=1,at.exports=function(t){return t.mode.CTR=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._counter;o&&(i=this._counter=o.slice(0),this._iv=void 0);var s=i.slice(0);r.encryptBlock(s,0),i[n-1]=i[n-1]+1|0;for(var c=0;c<n;c++)t[e+c]^=s[c]}}),e.Decryptor=r,e),t.mode.CTR;var e,r}(u(),nt())),at.exports}var ft,ht={exports:{}};function lt(){return ft||(ft=1,ht.exports=function(t){
2
+ /** @preserve
3
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
4
+ * derived from CryptoJS.mode.CTR
5
+ * Jan Hruby jhruby.web@gmail.com
6
+ */
7
+ return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function r(t){if(255&~(t>>24))t+=1<<24;else{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}return t}function n(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var o=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,o=r.blockSize,i=this._iv,s=this._counter;i&&(s=this._counter=i.slice(0),this._iv=void 0),n(s);var c=s.slice(0);r.encryptBlock(c,0);for(var a=0;a<o;a++)t[e+a]^=c[a]}});return e.Decryptor=o,e}(),t.mode.CTRGladman}(u(),nt())),ht.exports}var dt,pt={exports:{}};function vt(){return dt||(dt=1,pt.exports=function(t){return t.mode.OFB=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=this._iv,i=this._keystream;o&&(i=this._keystream=o.slice(0),this._iv=void 0),r.encryptBlock(i,0);for(var s=0;s<n;s++)t[e+s]^=i[s]}}),e.Decryptor=r,e),t.mode.OFB;var e,r}(u(),nt())),pt.exports}var yt,gt={exports:{}};var _t,mt={exports:{}};var xt,wt={exports:{}};var Bt,kt={exports:{}};var bt,St={exports:{}};var At,Ct={exports:{}};var Ht,zt={exports:{}};var Pt,Dt={exports:{}};var Et,Rt={exports:{}};function Ot(){return Et||(Et=1,Rt.exports=function(t){return function(){var e=t,r=e.lib,n=r.WordArray,o=r.BlockCipher,i=e.algo,s=[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],c=[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],a=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{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],h=i.DES=o.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var n=s[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(var o=this._subKeys=[],i=0;i<16;i++){var u=o[i]=[],f=a[i];for(r=0;r<24;r++)u[r/6|0]|=e[(c[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=e[28+(c[r+24]-1+f)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=o[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],l.call(this,4,252645135),l.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),l.call(this,1,1431655765);for(var n=0;n<16;n++){for(var o=r[n],i=this._lBlock,s=this._rBlock,c=0,a=0;a<8;a++)c|=u[a][((s^o[a])&f[a])>>>0];this._lBlock=s,this._rBlock=i^c}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,l.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),l.call(this,16,65535),l.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function l(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function d(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}e.DES=o._createHelper(h);var p=i.TripleDES=o.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),r=t.length<4?t.slice(0,2):t.slice(2,4),o=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(e)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(o))},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});e.TripleDES=o._createHelper(p)}(),t.TripleDES}(u(),w(),C(),$(),nt())),Rt.exports}var Mt,jt={exports:{}};var Ft,It={exports:{}};var Wt,Tt={exports:{}};var Ut,Nt={exports:{}};function Kt(){return Ut||(Ut=1,Nt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo;const o=16,i=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function a(t,e){let r=e>>24&255,n=e>>16&255,o=e>>8&255,i=255&e,s=t.sbox[0][r]+t.sbox[1][n];return s^=t.sbox[2][o],s+=t.sbox[3][i],s}function u(t,e,r){let n,i=e,s=r;for(let e=0;e<o;++e)i^=t.pbox[e],s=a(t,i)^s,n=i,i=s,s=n;return n=i,i=s,s=n,s^=t.pbox[o],i^=t.pbox[o+1],{left:i,right:s}}function f(t,e,r){let n,i=e,s=r;for(let e=o+1;e>1;--e)i^=t.pbox[e],s=a(t,i)^s,n=i,i=s,s=n;return n=i,i=s,s=n,s^=t.pbox[1],i^=t.pbox[0],{left:i,right:s}}function h(t,e,r){for(let e=0;e<4;e++){t.sbox[e]=[];for(let r=0;r<256;r++)t.sbox[e][r]=s[e][r]}let n=0;for(let s=0;s<o+2;s++)t.pbox[s]=i[s]^e[n],n++,n>=r&&(n=0);let c=0,a=0,f=0;for(let e=0;e<o+2;e+=2)f=u(t,c,a),c=f.left,a=f.right,t.pbox[e]=c,t.pbox[e+1]=a;for(let e=0;e<4;e++)for(let r=0;r<256;r+=2)f=u(t,c,a),c=f.left,a=f.right,t.sbox[e][r]=c,t.sbox[e][r+1]=a;return!0}var l=n.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4;h(c,e,r)}},encryptBlock:function(t,e){var r=u(c,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},decryptBlock:function(t,e){var r=f(c,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=r._createHelper(l)}(),t.Blowfish}(u(),w(),C(),$(),nt())),Nt.exports}var Lt;var Xt=(Lt||(Lt=1,s.exports=function(t){return t}(u(),l(),v(),_(),w(),b(),C(),P(),R(),O||(O=1,M.exports=function(t){return r=(e=t).lib.WordArray,n=e.algo,o=n.SHA256,i=n.SHA224=o.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=4,t}}),e.SHA224=o._createHelper(i),e.HmacSHA224=o._createHmacHelper(i),t.SHA224;var e,r,n,o,i}(u(),R())),I(),W||(W=1,T.exports=function(t){return r=(e=t).x64,n=r.Word,o=r.WordArray,i=e.algo,s=i.SHA512,c=i.SHA384=s.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}}),e.SHA384=s._createHelper(c),e.HmacSHA384=s._createHmacHelper(c),t.SHA384;var e,r,n,o,i,s,c}(u(),l(),I())),K(),L||(L=1,X.exports=function(t){
8
+ /** @preserve
9
+ (c) 2012 by Cédric Mesnil. All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
12
+
13
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
14
+ - 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.
15
+
16
+ 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.
17
+ */
18
+ return function(){var e=t,r=e.lib,n=r.WordArray,o=r.Hasher,i=e.algo,s=n.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]),c=n.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]),a=n.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]),u=n.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]),f=n.create([0,1518500249,1859775393,2400959708,2840853838]),h=n.create([1352829926,1548603684,1836072691,2053994217,0]),l=i.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,l,m,x,w,B,k,b,S,A,C,H=this._hash.words,z=f.words,P=h.words,D=s.words,E=c.words,R=a.words,O=u.words;for(B=i=H[0],k=l=H[1],b=m=H[2],S=x=H[3],A=w=H[4],r=0;r<80;r+=1)C=i+t[e+D[r]]|0,C+=r<16?d(l,m,x)+z[0]:r<32?p(l,m,x)+z[1]:r<48?v(l,m,x)+z[2]:r<64?y(l,m,x)+z[3]:g(l,m,x)+z[4],C=(C=_(C|=0,R[r]))+w|0,i=w,w=x,x=_(m,10),m=l,l=C,C=B+t[e+E[r]]|0,C+=r<16?g(k,b,S)+P[0]:r<32?y(k,b,S)+P[1]:r<48?v(k,b,S)+P[2]:r<64?p(k,b,S)+P[3]:d(k,b,S)+P[4],C=(C=_(C|=0,O[r]))+A|0,B=A,A=S,S=_(b,10),b=k,k=C;C=H[1]+m+S|0,H[1]=H[2]+x+A|0,H[2]=H[3]+w+B|0,H[3]=H[4]+i+k|0,H[4]=H[0]+l+b|0,H[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 o=this._hash,i=o.words,s=0;s<5;s++){var c=i[s];i[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},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 p(t,e,r){return t&e|~t&r}function v(t,e,r){return(t|~e)^r}function y(t,e,r){return t&r|e&~r}function g(t,e,r){return t^(e|~r)}function _(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(l),e.HmacRIPEMD160=o._createHmacHelper(l)}(),t.RIPEMD160}(u())),Q(),Z||(Z=1,G.exports=function(t){return n=(r=(e=t).lib).Base,o=r.WordArray,s=(i=e.algo).SHA256,c=i.HMAC,a=i.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:25e4}),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=o.create(),s=o.create([1]),a=i.words,u=s.words,f=r.keySize,h=r.iterations;a.length<f;){var l=n.update(e).finalize(s);n.reset();for(var d=l.words,p=d.length,v=l,y=1;y<h;y++){v=n.finalize(v),n.reset();for(var g=v.words,_=0;_<p;_++)d[_]^=g[_]}i.concat(l),u[0]++}return i.sigBytes=4*f,i}}),e.PBKDF2=function(t,e,r){return a.create(r).compute(t,e)},t.PBKDF2;var e,r,n,o,i,s,c,a}(u(),R(),Q())),$(),nt(),st(),ut(),lt(),vt(),yt||(yt=1,gt.exports=function(t){return t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e),t.mode.ECB;var e}(u(),nt())),_t||(_t=1,mt.exports=function(t){return t.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,n=4*e,o=n-r%n,i=r+o-1;t.clamp(),t.words[i>>>2]|=o<<24-i%4*8,t.sigBytes+=o},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923}(u(),nt())),xt||(xt=1,wt.exports=function(t){return t.pad.Iso10126={pad:function(e,r){var n=4*r,o=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126}(u(),nt())),Bt||(Bt=1,kt.exports=function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971}(u(),nt())),bt||(bt=1,St.exports=function(t){return t.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}}},t.pad.ZeroPadding}(u(),nt())),At||(At=1,Ct.exports=function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding}(u(),nt())),Ht||(Ht=1,zt.exports=function(t){return r=(e=t).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(t){return t.ciphertext.toString(n)},parse:function(t){var e=n.parse(t);return r.create({ciphertext:e})}},t.format.Hex;var e,r,n}(u(),nt())),Pt||(Pt=1,Dt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo,o=[],i=[],s=[],c=[],a=[],u=[],f=[],h=[],l=[],d=[];!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 p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,o[r]=p,i[p]=r;var v=t[r],y=t[v],g=t[y],_=257*t[p]^16843008*p;s[r]=_<<24|_>>>8,c[r]=_<<16|_>>>16,a[r]=_<<8|_>>>24,u[r]=_,_=16843009*g^65537*y^257*v^16843008*r,f[p]=_<<24|_>>>8,h[p]=_<<16|_>>>16,l[p]=_<<8|_>>>24,d[p]=_,r?(r=v^t[t[t[g^v]]],n^=t[t[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.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),i=this._keySchedule=[],s=0;s<n;s++)s<r?i[s]=e[s]:(u=i[s-1],s%r?r>6&&s%r==4&&(u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u]):(u=o[(u=u<<8|u>>>24)>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u],u^=p[s/r|0]<<24),i[s]=i[s-r]^u);for(var c=this._invKeySchedule=[],a=0;a<n;a++){if(s=n-a,a%4)var u=i[s];else u=i[s-4];c[a]=a<4||s<=4?u:f[o[u>>>24]]^h[o[u>>>16&255]]^l[o[u>>>8&255]]^d[o[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,c,a,u,o)},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,h,l,d,i),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,o,i,s,c){for(var a=this._nRounds,u=t[e]^r[0],f=t[e+1]^r[1],h=t[e+2]^r[2],l=t[e+3]^r[3],d=4,p=1;p<a;p++){var v=n[u>>>24]^o[f>>>16&255]^i[h>>>8&255]^s[255&l]^r[d++],y=n[f>>>24]^o[h>>>16&255]^i[l>>>8&255]^s[255&u]^r[d++],g=n[h>>>24]^o[l>>>16&255]^i[u>>>8&255]^s[255&f]^r[d++],_=n[l>>>24]^o[u>>>16&255]^i[f>>>8&255]^s[255&h]^r[d++];u=v,f=y,h=g,l=_}v=(c[u>>>24]<<24|c[f>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[d++],y=(c[f>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&u])^r[d++],g=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[u>>>8&255]<<8|c[255&f])^r[d++],_=(c[l>>>24]<<24|c[u>>>16&255]<<16|c[f>>>8&255]<<8|c[255&h])^r[d++],t[e]=v,t[e+1]=y,t[e+2]=g,t[e+3]=_},keySize:8});e.AES=r._createHelper(v)}(),t.AES}(u(),w(),C(),$(),nt())),Ot(),Mt||(Mt=1,jt.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=n.RC4=r.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,n=this._S=[],o=0;o<256;o++)n[o]=o;o=0;for(var i=0;o<256;o++){var s=o%r,c=e[s>>>2]>>>24-s%4*8&255;i=(i+n[o]+c)%256;var a=n[o];n[o]=n[i],n[i]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var t=this._S,e=this._i,r=this._j,n=0,o=0;o<4;o++){r=(r+t[e=(e+1)%256])%256;var i=t[e];t[e]=t[r],t[r]=i,n|=t[(t[e]+t[r])%256]<<24-8*o}return this._i=e,this._j=r,n}e.RC4=r._createHelper(o);var s=n.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)i.call(this)}});e.RC4Drop=r._createHelper(s)}(),t.RC4}(u(),w(),C(),$(),nt())),Ft||(Ft=1,It.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=[],i=[],s=[],c=n.Rabbit=r.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],o=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++)a.call(this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(e){var i=e.words,s=i[0],c=i[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(o[0]^=u,o[1]^=h,o[2]^=f,o[3]^=l,o[4]^=u,o[5]^=h,o[6]^=f,o[7]^=l,r=0;r<4;r++)a.call(this)}},_doProcessBlock:function(t,e){var r=this._X;a.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[e+n]^=o[n]},blockSize:4,ivSize:2});function a(){for(var t=this._X,e=this._C,r=0;r<8;r++)i[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],o=65535&n,c=n>>>16,a=((o*o>>>17)+o*c>>>15)+c*c,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=a^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=r._createHelper(c)}(),t.Rabbit}(u(),w(),C(),$(),nt())),Wt||(Wt=1,Tt.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,n=e.algo,o=[],i=[],s=[],c=n.RabbitLegacy=r.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 o=0;o<4;o++)a.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(e){var i=e.words,s=i[0],c=i[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(n[0]^=u,n[1]^=h,n[2]^=f,n[3]^=l,n[4]^=u,n[5]^=h,n[6]^=f,n[7]^=l,o=0;o<4;o++)a.call(this)}},_doProcessBlock:function(t,e){var r=this._X;a.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[e+n]^=o[n]},blockSize:4,ivSize:2});function a(){for(var t=this._X,e=this._C,r=0;r<8;r++)i[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,r=0;r<8;r++){var n=t[r]+e[r],o=65535&n,c=n>>>16,a=((o*o>>>17)+o*c>>>15)+c*c,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=a^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=r._createHelper(c)}(),t.RabbitLegacy}(u(),w(),C(),$(),nt())),Kt())),s.exports),Jt=i(Xt),qt=Xt.MD5("page.jsxingqier.com").toString(),Qt=Jt.enc.Utf8.parse(qt.substr(0,24)),Zt=Jt.enc.Utf8.parse("dssearch".substr(0,8));var Gt={des_encrypt:function(t){return"object"==n(t)&&(t=JSON.stringify(t)),Jt.TripleDES.encrypt(t,Qt,{iv:Zt,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString()},des_decrypt:function(t){var e=(t=t.replace('"',"").replace('"',"")).toString(Jt.enc.Utf8);return Jt.TripleDES.decrypt(e,Qt,{iv:Zt,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString(Jt.enc.Utf8)}},Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fail",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;tt.showToast({title:t,icon:e,duration:r,mask:!0,success:n})},Yt="https://page.hurricanegame.cn/",$t="POST";function te(t,e,r){return new Promise(function(n,o){tt.request({url:Yt+e,method:t,data:t===$t?JSON.stringify(r):r,header:{"content-type":"application/json"},success:function(t){200===t.statusCode?n(t.data):console.error("Network Error!")}})})}function ee(t){t.time=parseInt(Date.parse(new Date)/1e3);var e=function(t){for(var e=Object.keys(t).sort(),r={},n=0;n<e.length;n++){var o=e[n];r[o]=t[o]}return r}(t);return t.sign||(t.sign=Xt.MD5(function(t){var e="";for(var r in t){var n="";null!=t[r]?n=t[r]:t[r]="",e+=r+"="+n+"&"}return e=e.slice(0,e.length-1)}(e)+"WvgAUx8i0JeG5aaF").toString()),t}var re={mac:"",imei:"",oaid:"",androidid:"",idfa:"",idfv:"",sdkver:"1.0.0"},ne=0,oe=function(){var t={duid:""},e=tt.getStorageSync("duid");if(e)t.duid=e,ne=0;else{console.log(ne);var r=function(){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",e="",r=0;r<32;r++)e+=t.charAt(Math.floor(48*Math.random()));return e}();tt.setStorageSync("duid",r),t.duid=r,ne=1}return t},ie=function(){var t={os:"",brand:"",resolution:"",model:"",sysver:""};try{var e=tt.getSystemInfoSync();t.sysver=e.system,t.resolution=e.screenWidth+"*"+e.screenHeight,t.model=e.model,t.os=e.platform,t.brand=e.brand}catch(t){console.log(t),console.log("获取设备系统信息失败")}return t},se=function(){return r(r(r({},oe()),ie()),re)},ce=JSON.stringify(tt.getLaunchOptionsSync()||""),ae={},ue={},fe={},he={},le=null,de=20,pe=!1,ve=!1,ye=function(t){var e=r(r(r(r(r(r({},ae),ue),fe),he),r(r({},oe()),re)),{},{launchoption:ce});t&&(e.res=JSON.stringify(t));var n=ee(e);te($t,"/ttgamesend/send/",n).then(function(t){console.log(t)}).catch(function(t){console.log(t)})},ge=function(t,e){var n=ee(r(r(r(r(r({},ae),fe),ue),r(r({},oe()),re)),{},{launchoption:ce}));te($t,"/ttgamesend/index/",n).then(function(r){if(1===r.state){var n=r.data,o=n.balance,i=n.platform;o>=t?ye():"android"===i?function(t,e){var r=t.mode,n=t.buyQuantity,o=t.env,i=t.currencyType,s=t.platform,c=t.zoneId;console.log("【调支付】",{mode:r,env:o,currencyType:i,platform:s,buyQuantity:n,zoneId:c,customId:e}),tt.requestGamePayment({mode:r,env:o,currencyType:i,platform:s,buyQuantity:n,zoneId:c,customId:e,success:function(t){ye(t),console.log("【调用函数成功】",t)},fail:function(t){console.log("【调用函数失败】",t)},complete:function(){console.log("调用完成")}})}(r.data,e):function(t,e){var r=t.buyQuantity,n=t.zoneId;tt.openAwemeCustomerService({currencyType:"CNY",buyQuantity:r,zoneId:n+"",customId:e,success:function(t){ye(t)},fail:function(t){console.log("【调用函数失败】",t)},complete:function(t){console.log("调用完成")}})}(r.data,e)}}).catch(function(t){console.log(t)})},_e=function(){var t,e,n,o=ee(r(r(r(r(r(r({},ue),fe),ae),he),se()),{},{pway:"wxnativepay",launchoption:ce,sign:Xt.MD5("".concat(o.partner_id).concat(o.game_id).concat(o.pkg_name).concat(o.version).concat(o.sdkver).concat(o.time,"qvEw6PzHFfkiZsIQ").concat(o.moid)).toString()}));(t=$t,e="/search/indexEncry",n={joking:Gt.des_encrypt(o)},new Promise(function(r,o){tt.request({url:Yt+e,method:t,data:t===$t?JSON.stringify(n):n,success:function(t){console.log(t),200===t.statusCode?t.data?r(t.data):o("request interface error"):console.error("Network Error!")}})})).then(function(t){console.log("【次数】",de);try{var e=JSON.parse(Gt.des_decrypt(t));console.log("【返回结果】",e),e.state?(Vt("充值成功"),clearTimeout(le)):me()}catch(t){console.log("【err】",t)}})},me=function(){0==de?(clearTimeout(le),de=20):le=setTimeout(function(){de--,_e()},1e3)};exports.jf_active=function(t){return new Promise(function(e,r){if(!t)return r({state:100001,msg:"激活入参缺失"});if(null==t||!t.tt)return r({state:100002,msg:"激活入参 tt 属性缺失"});var n=t.tt,o=n.game_id,i=n.version;if(!o)return r({state:100003,msg:"激活入参 game_id 属性缺失"});ue.game_id=o,ue.version=i,ue.pkg_name="dygame",ue.partner_id=145,pe=!0,console.log("active 激活成功!"),e()})},exports.jf_createRewardedVideoAd=function(t){var e=null,r=!1,n=!1,o=function(){return r||n?Promise.resolve():(r=!0,new Promise(function(o,i){(e=tt.createRewardedVideoAd({adUnitId:t,progressTip:!0})).load().then(function(){n=!0,r=!1,o()}).catch(function(t){r=!1,n=!1,e=null,i(t)})}))},i=function(){return n?new Promise(function(t,r){e?(e.onClose(function(t){console.log("广告关闭:",t.isEnded?"正常播放完成":"用户提前关闭")}),e.show().then(function(){console.log("激励视频广告展示成功"),t()}).catch(function(t){n=!1,r({state:100003,msg:JSON.stringify(t)})})):r({state:100002,msg:"广告实例不存在"})}):o().then(i).catch(function(t){return Promise.reject({state:100001,msg:JSON.stringify(t)})})};return{preload:o,show:i}},exports.jf_customerService=function(){tt.openCustomerServiceConversation({type:2,success:function(t){console.log(t)},fail:function(t){console.log(t)}})},exports.jf_getUserInfo=function(){return new Promise(function(t,e){tt.getUserProfile({success:function(e){return t(e.userInfo)},fail:function(t){return e({state:100001,msg:JSON.stringify(t)})}})})},exports.jf_login=function(){return new Promise(function(t,e){if(!pe)return e({state:100003,msg:"登录前请先激活"});tt.login({success:function(n){if(n.isLogin){var o=ee(r(r(r({code:n.code,anonymousCode:n.anonymousCode},ue),r(r(r(r({},oe()),ie()),re),{},{install:ne,ntype:""})),{},{launchoption:ce}));te($t,"/ttgamelogin/initlogin/",o).then(function(e){var r=e.data||{},n=r.openid,o=r.token,i=r.uid,s=r.uname;fe={openid:n,token:o,uid:i,uname:s},ve=!0,t(e.data)}).catch(function(t){e({state:100001,msg:t.msg})})}},fail:function(){e({state:100002,msg:"tt.login 出错"})}})})},exports.jf_pay=function(t){return new Promise(function(e,n){if(!pe||!ve)return Vt("失败!请先激活登录"),n({state:100001,msg:"未激活或未登录,请重新进入游戏"});tt.showLoading({title:"加载中"}),ae=r(r({},t),{},{money:t.dmoney});var o=ee(r(r(r(r(r({},ue),fe),ae),se()),{},{launchoption:ce}));te($t,"/ttgameorder/index/",o).then(function(t){var r=t||{},o=r.state,i=r.msg,s=r.data,c=void 0===s?{}:s;if(1==o){var a=c.aid,u=c.moid,f=c.code_url;he.moid=u,1==a?(ge(ae.dmoney,u),e({msg:"ok"})):2==a?(e({code_url:f,show_state:1}),clearTimeout(le),_e()):(Vt("失败!设备未识别"),n({state:100004,msg:"支付失败"}))}else Vt(i),n({state:o,msg:i});tt.hideLoading()}).catch(function(t){Vt(t),n({state:100002,msg:"支付失败"}),tt.hideLoading()})})},exports.jf_profanityCheck=function(t){},exports.jf_share=function(t){},exports.jf_showInterstitialAd=function(t){},exports.jf_trace=function(t){return new Promise(function(e,n){if(!pe||!ve)return Vt("失败!请先激活登录"),n({state:100001,msg:"未激活或未登录,请检查"});var o=ee(r(r(r(r(r({},t),fe),ue),r(r({},oe()),re)),{},{launchoption:ce,onshow:ce}));te($t,"/ttgameevent/index/",o).then(function(){return e()}).catch(function(){return n({state:100002,msg:"角色上报失败"})})})},exports.jf_tracePageView=function(t){};
package/lib/wxSdk.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";function e(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(exports,"__esModule",{value:!0});var o,i,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;wx.showToast({title:e,icon:t,duration:n,mask:!0,success:r})},u="POST";function c(e,t,n){return new Promise(function(r,o){wx.request({url:"https://page.hurricanegame.cn"+t,method:e,data:e===u?JSON.stringify(n):n,header:{"content-type":"application/json"},success:function(e){200===e.statusCode?e.data.state?r(e.data):o("request interface error"):console.error("Network Error!")}})})}var s=(i||(i=1,o={md5:function(e){function t(e,t){return e<<t|e>>>32-t}function n(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function r(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e&t|~e&n}(r,o,i),a),c)),n(t(e,u),r)}function o(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e&n|t&~n}(r,o,i),a),c)),n(t(e,u),r)}function i(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return e^t^n}(r,o,i),a),c)),n(t(e,u),r)}function a(e,r,o,i,a,u,c){return e=n(e,n(n(function(e,t,n){return t^(e|~n)}(r,o,i),a),c)),n(t(e,u),r)}function u(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var c,s,l,f,d,p,v,h,g,y=Array();for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e),y=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u<n;)a=u%4*8,i[t=(u-u%4)/4]=i[t]|e.charCodeAt(u)<<a,u++;return a=u%4*8,i[t=(u-u%4)/4]=i[t]|128<<a,i[o-2]=n<<3,i[o-1]=n>>>29,i}(e),p=1732584193,v=4023233417,h=2562383102,g=271733878,c=0;c<y.length;c+=16)s=p,l=v,f=h,d=g,p=r(p,v,h,g,y[c+0],7,3614090360),g=r(g,p,v,h,y[c+1],12,3905402710),h=r(h,g,p,v,y[c+2],17,606105819),v=r(v,h,g,p,y[c+3],22,3250441966),p=r(p,v,h,g,y[c+4],7,4118548399),g=r(g,p,v,h,y[c+5],12,1200080426),h=r(h,g,p,v,y[c+6],17,2821735955),v=r(v,h,g,p,y[c+7],22,4249261313),p=r(p,v,h,g,y[c+8],7,1770035416),g=r(g,p,v,h,y[c+9],12,2336552879),h=r(h,g,p,v,y[c+10],17,4294925233),v=r(v,h,g,p,y[c+11],22,2304563134),p=r(p,v,h,g,y[c+12],7,1804603682),g=r(g,p,v,h,y[c+13],12,4254626195),h=r(h,g,p,v,y[c+14],17,2792965006),p=o(p,v=r(v,h,g,p,y[c+15],22,1236535329),h,g,y[c+1],5,4129170786),g=o(g,p,v,h,y[c+6],9,3225465664),h=o(h,g,p,v,y[c+11],14,643717713),v=o(v,h,g,p,y[c+0],20,3921069994),p=o(p,v,h,g,y[c+5],5,3593408605),g=o(g,p,v,h,y[c+10],9,38016083),h=o(h,g,p,v,y[c+15],14,3634488961),v=o(v,h,g,p,y[c+4],20,3889429448),p=o(p,v,h,g,y[c+9],5,568446438),g=o(g,p,v,h,y[c+14],9,3275163606),h=o(h,g,p,v,y[c+3],14,4107603335),v=o(v,h,g,p,y[c+8],20,1163531501),p=o(p,v,h,g,y[c+13],5,2850285829),g=o(g,p,v,h,y[c+2],9,4243563512),h=o(h,g,p,v,y[c+7],14,1735328473),p=i(p,v=o(v,h,g,p,y[c+12],20,2368359562),h,g,y[c+5],4,4294588738),g=i(g,p,v,h,y[c+8],11,2272392833),h=i(h,g,p,v,y[c+11],16,1839030562),v=i(v,h,g,p,y[c+14],23,4259657740),p=i(p,v,h,g,y[c+1],4,2763975236),g=i(g,p,v,h,y[c+4],11,1272893353),h=i(h,g,p,v,y[c+7],16,4139469664),v=i(v,h,g,p,y[c+10],23,3200236656),p=i(p,v,h,g,y[c+13],4,681279174),g=i(g,p,v,h,y[c+0],11,3936430074),h=i(h,g,p,v,y[c+3],16,3572445317),v=i(v,h,g,p,y[c+6],23,76029189),p=i(p,v,h,g,y[c+9],4,3654602809),g=i(g,p,v,h,y[c+12],11,3873151461),h=i(h,g,p,v,y[c+15],16,530742520),p=a(p,v=i(v,h,g,p,y[c+2],23,3299628645),h,g,y[c+0],6,4096336452),g=a(g,p,v,h,y[c+7],10,1126891415),h=a(h,g,p,v,y[c+14],15,2878612391),v=a(v,h,g,p,y[c+5],21,4237533241),p=a(p,v,h,g,y[c+12],6,1700485571),g=a(g,p,v,h,y[c+3],10,2399980690),h=a(h,g,p,v,y[c+10],15,4293915773),v=a(v,h,g,p,y[c+1],21,2240044497),p=a(p,v,h,g,y[c+8],6,1873313359),g=a(g,p,v,h,y[c+15],10,4264355552),h=a(h,g,p,v,y[c+6],15,2734768916),v=a(v,h,g,p,y[c+13],21,1309151649),p=a(p,v,h,g,y[c+4],6,4149444226),g=a(g,p,v,h,y[c+11],10,3174756917),h=a(h,g,p,v,y[c+2],15,718787259),v=a(v,h,g,p,y[c+9],21,3951481745),p=n(p,s),v=n(v,l),h=n(h,f),g=n(g,d);return(u(p)+u(v)+u(h)+u(g)).toLowerCase()}}),o);function l(e){e.time=parseInt(Date.parse(new Date)/1e3);var t=function(e){for(var t=Object.keys(e).sort(),n={},r=0;r<t.length;r++){var o=t[r];n[o]=e[o]}return n}(e);return e.sign||(e.sign=s.md5(function(e){var t="";for(var n in e){var r="";null!=e[n]?r=e[n]:e[n]="",t+=n+"="+r+"&"}return t.slice(0,t.length-1)}(t)+"WvgAUx8i0JeG5aaF")),e}function f(e){var t;if("object"===r(e))if(Array.isArray(e))for(var n in t=[],e)t.push(f(e[n]));else if(null===e)t=null;else if(e.constructor===RegExp)t=e;else for(var o in t={},e)t[o]=f(e[o]);else t=e;return t}var d={mac:"",imei:"",oaid:"",androidid:"",idfa:"",idfv:"",sdkver:"1.0"},p=0,v=function(){var e={duid:""},t=wx.getStorageSync("duid");if(t)e.duid=t,p=0;else{console.log(p);var n=function(){for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",t="",n=0;n<32;n++)t+=e.charAt(Math.floor(48*Math.random()));return t}();wx.setStorageSync("duid",n),e.duid=n,p=1}return e},h=function(){var e={client:"",brand:"",resolution:"",model:"",sysver:""};try{var t=wx.getSystemInfoSync();e.sysver=t.system,e.resolution=t.screenWidth+"*"+t.screenHeight,e.model=t.model,e.client=t.platform,e.brand=t.brand}catch(e){console.log("【获取设备系统信息失败】",e)}return e},g=function(){return n(n(n(n({},v()),h()),d),{},{install:p,ntype:""})};
2
+ /**
3
+ * @dn-sdk/minigame v1.5.5
4
+ * (c) 2025
5
+ * @license ISC
6
+ */
7
+ function y(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function I(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e){var t=function(e){if("object"!==E(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===E(t)?t:String(t)}var N,P,L="LOCAL_ID",M="CLICK_ID",D="QUEUE_LOST_MAP",q="REMOTE_CONFIG",j="REMOTE_COMMON_CONFIG",U="OPENID",F={init:"init",reporting:"reporting",fail:"fail"},V={maxSdkInstance:4,maxQueueLength:500,actionParamMaxLength:1e4,autoTrack:!0,reportThreshold:5,reportDelay:1,inspectDelay:30,cgiBatchSize:50,requestConcurrency:4,requestTimeout:1e4,signVersion:"1.0",realTimeActionList:["START_APP","REGISTER","PURCHASE"]},B="JS_RUN_ERROR",K="REQUEST_ERROR",G="REQUEST_CONFIG_ERROR",W="JS_QUEUE_LOG",J="PROXY_ERROR",H="QUEUE_LOST_NUM",Q="SIGN_ERROR",Y="UNKNOWN",z="TRUE",$="FALSE",Z="TICKET_INTERVAL_CHANGE",X=(P=function(e){return"".concat("@dn-sdk/minigame","_").concat("production","_").concat(e)},{getSync:function(e){var t;try{t=wx.getStorageSync(P(e))}catch(e){return console.error("storage get error",e),t}return t},setSync:function(e,t){try{wx.setStorageSync(P(e),t)}catch(e){return console.error("storage set error",e),!1}return!0}}),ee=function(){var e;return function(){if(!e){var t=function(){if(N)return N;try{return N=wx.getSystemInfoSync()}catch(e){return{}}}(),n=t.system,r=void 0===n?"":n,o=(null==r?void 0:r.split(" "))||[],i=function(e){if(!e)return Y;var t=(null==e?void 0:e.toUpperCase())||"";return t.indexOf("ANDROID")>-1?"ANDROID":t.indexOf("IOS")>-1?"IOS":t.indexOf("MAC")>-1?"OSX":t.indexOf("WINDOWS")>-1?"WINDOWS":Y}(o[0]),a=function(e){return!e||e.length<=0?"":2===e.length?e[1]:3===e.length&&"Windows"===e[0]?"".concat(e[1]," ").concat(e[2]):e[e.length-1]}(o);e={benchmark_level:t.benchmarkLevel,device_brand:t.brand,screen_height:Math.floor(t.screenHeight),screen_width:Math.floor(t.screenWidth),wx_lib_version:t.SDKVersion,wx_version:t.version,wx_platform:t.platform,device_model:t.model,os:i,os_version:a}}return e}}(),te=function(){var e;return function(){try{if(e)return e;e||(e=X.getSync(L)||""),e||(e=ye(),X.setSync(L,e))}catch(e){}return e}}(),ne=function(){var e="unknown",t=!1;return function(){if(!t)try{wx.getNetworkType({success:function(t){e=t.networkType},fail:function(){e="unknown"}}),wx.onNetworkStatusChange(function(t){e=t.networkType}),t=!0}catch(e){}return e}}();ne();var re=function(){var e="";return function(){return e||(e=X.getSync(U)||""),e}}(),oe=function(){var e;return function(){if(e)return e;try{var t=wx.getAccountInfoSync();return pe(t.miniProgram)?e=t.miniProgram:{}}catch(t){return{}}}}();function ie(e){var t=null==e?void 0:e.query;if(!pe(t))return"";var n="";return t.gdt_vid||[1045,1046,1084].indexOf(null==e?void 0:e.scene)>-1?n="TENCENT":t.clue_token||t.clickid&&t.item_id?n="BYTEDANCE":t.callback&&"kuaishou"===t.ksChannel?n="KUAISHOU":t.bd_vid||t.ai&&t.d&&t.q&&t.c?n="BAIDU":t.uctrackid?n="ALIBABA":(t.trackid||t.imp||[1065,1069,1194].indexOf(null==e?void 0:e.scene)>-1&&(t.callback||t.u))&&(n="OTHERS"),n}function ae(e,t){try{var n=ee(),r=oe(),o={sdk_version:"1.5.5",sdk_name:"@dn-sdk/minigame",device_brand:null==n?void 0:n.device_brand,device_model:null==n?void 0:n.device_model,wx_version:null==n?void 0:n.wx_version,wx_lib_version:null==n?void 0:n.wx_lib_version,wx_platform:null==n?void 0:n.wx_platform,os:null==n?void 0:n.os,os_version:null==n?void 0:n.os_version,local_id:te(),env_version:null==r?void 0:r.envVersion,appid:null==r?void 0:r.appId},i=Object.assign(o,e);wx.request({url:"https://api.datanexus.qq.com/data-nexus-trace/log",data:i,method:"POST",timeout:V.requestTimeout,success:function(e){"function"==typeof t&&200===(null==e?void 0:e.statusCode)&&t()}})}catch(n){Oe.error(n)}}var ue=function(){function e(){O(this,e)}return I(e,null,[{key:"revise",value:function(e){e>0&&!this.isRevised&&(this.offsetTime=e-Date.now(),this.isRevised=!0)}},{key:"getRevisedcurrentTimeMillis",value:function(){return this.isRevised?Date.now()+this.offsetTime:-1}}]),e}();function ce(e){return new Promise(function(t,n){wx.request({method:"POST",url:"https://api.datanexus.qq.com/data-nexus-config/v1/sdk/config/get",data:e,timeout:V.requestTimeout,success:function(e){se(e,t,"config/get",n),fe(e)},fail:function(e){le(e,"config/get",n)}})})}function se(e,t,n,r){var o,i,a,u,c=null==e?void 0:e.statusCode,s=null==(o=null==e?void 0:e.data)?void 0:o.code;if(200!==c||0!==s){var l=s;200!==c&&(l="number"==typeof c?-1*c:-888),ae({log_type:G,message:"cgiName: ".concat(n,", statusCode: ").concat(c,", code: ").concat(s,", traceid: ").concat(null==(a=null==e?void 0:e.data)?void 0:a.trace_id),code:l}),null==r||r(null==(u=null==e?void 0:e.data)?void 0:u.data)}else t(null==(i=e.data)?void 0:i.data)}function le(e,t,n){ae({log_type:G,message:"cgiName: ".concat(t," , message: ").concat(null==e?void 0:e.errMsg," "),code:"number"==typeof(null==e?void 0:e.errno)?-1*e.errno:-999}),null==n||n(e)}function fe(e){var t,n=1*(null==(t=null==e?void 0:e.header)?void 0:t["Server-Time"]);n>17266752e5&&ue.revise(n)}ue.offsetTime=0,ue.isRevised=!1;var de=Object.prototype.toString,pe=function(e){return"[object Object]"===de.call(e)},ve=function(e){return"[object Array]"===de.call(e)},he=function(e){return"[object Function]"===de.call(e)},ge=(new Date).getTime();function ye(){var e=(new Date).getTime(),t=Math.abs(1e3*(e-ge));return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=16*Math.random();return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),("x"===n?r:3&r|8).toString(16).replace(/-/g,"")})}var me=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,_e=function(e){if("string"!=typeof e)throw new TypeError("Invalid argument expected string");if(!me.test(e))throw new Error("Invalid argument not valid semver ('".concat(e,"' received)"))},Ae=function(e){return isNaN(Number(e))?e:Number(e)},ke=function(e){var t=e.replace(/^v/,"").replace(/\+.*$/,""),n=function(e){return-1===e.indexOf("-")?e.length:e.indexOf("-")}(t),r=t.substring(0,n).split(".");return r.push(t.substring(n+1)),r},Se=function(e,t){[e,t].forEach(_e);for(var n=ke(e),r=ke(t),o=0;o<Math.max(n.length-1,r.length-1);o++){var i=parseInt(n[o]||"0",10),a=parseInt(r[o]||"0",10);if(i>a)return 1;if(a>i)return-1}var u=n[n.length-1],c=r[r.length-1];if(u&&c)for(var s=u.split(".").map(Ae),l=c.split(".").map(Ae),f=0;f<Math.max(s.length,l.length);f++){if(void 0===s[f]||"string"==typeof l[f]&&"number"==typeof s[f])return-1;if(void 0===l[f]||"string"==typeof s[f]&&"number"==typeof l[f]||s[f]>l[f])return 1;if(l[f]>s[f])return-1}else if(u||c)return u?-1:1;return 0};function be(e){return Te()[e]}function Te(){return V}function we(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Re=function(e){try{return e&&"string"==typeof e?-1===(e=e.replace(/\s/g,"")).indexOf(".")?e:e.split(".").slice(0,2).join("."):""}catch(t){return e}},Ee=function(){function e(){O(this,e)}return I(e,null,[{key:"error",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).error.apply(t,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(e)].concat(r))}},{key:"info",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.debug&&(n=console).info.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}},{key:"log",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.debug&&(n=console).log.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}},{key:"warn",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).warn.apply(t,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(e)].concat(r))}},{key:"devLog",value:function(t){for(var n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];e.isDev&&(n=console).log.apply(n,["".concat("[@dn-sdk/minigame v1.5.5]",": ").concat(t)].concat(o))}}]),e}(),Oe=Ee;Oe.debug=!1,Oe.isDev=!1;var xe=function(){var e;return function(){if(!e)try{var t=wx.getLaunchOptionsSync(),n=t.query.gdt_vid||"";n?X.setSync(M,n):n=X.getSync(M)||"";var r=JSON.stringify(t);r.length>1e4&&(r=JSON.stringify({cut:1,scene:t.scene})),e={source_scene:t.scene,pkg_channel_id:t.query.wxgamepro||"",ad_trace_id:n,launch_options:r,channel:ie(t)}}catch(t){e={},Oe.log("获取场景值和渠道号失败",t)}return e}}();function Ie(e,t,n){var r=n.value;return n.value=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];try{return r.apply(this,o)}catch(n){try{Oe.error.apply(Oe,["calling ".concat(e.constructor.name,".").concat(t," error with arguments")].concat(o)),Oe.error(n);var a={log_type:B,message:"[safeExcutable] ".concat(e.constructor.name,".").concat(t,": ").concat(null==n?void 0:n.message),err_stack:null==n?void 0:n.stack};he(this.reportLog)?this.reportLog(a):ae(a)}catch(a){}}},n}var Ce=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Pe=function(e,t,n,r){for(var o,i=r>1?void 0:r?Ne(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ce(t,n,i),i},Le=function(){function e(t){var n=t.userActionSetId,r=t.maxLength,o=void 0===r?500:r;O(this,e),this.lostActionMaps={},this.stack=[],this.localStorageKey="",this.localStorageKey="".concat("QUEUE_ACTIONS","_").concat(null==n?void 0:n.toString()),this.maxLength=o,this.userActionSetId=n,this.setTimeStamp(),this.init()}return I(e,[{key:"getItems",value:function(){return this.stack}},{key:"getStorage",value:function(){var e,t=(null==(e=X)?void 0:e.getSync(this.localStorageKey))||"[]";return JSON.parse(t)}},{key:"reportLostNum",value:function(){var e=this,t=Object.assign({},this.lostActionMaps),n=[];for(var r in t){var o=null==r?void 0:r.split("_");n.push({queue_lost_session_id:o[0],queue_lost_timestamp:o[1],queue_lost_num:t[r]})}n.length&&(this.setTimeStamp(),n.forEach(function(t){var n=Object.assign({},{user_action_set_id:e.userActionSetId,log_type:H},t),r=null==t?void 0:t.queue_lost_session_id,o=null==t?void 0:t.queue_lost_timestamp,i="".concat(r,"_").concat(o);ae(n,function(){we(e.lostActionMaps,i)&&(delete e.lostActionMaps[i],X.setSync(D,JSON.stringify(e.lostActionMaps)))})}))}},{key:"getLostMaps",value:function(){return this.lostActionMaps}},{key:"init",value:function(){var e=this,t=this.getStorage(),n=null==t?void 0:t.map(function(e){var t,n;return e.inner_status===(null==(t=F)?void 0:t.reporting)?Object.assign({},e,{inner_status:null==(n=F)?void 0:n.fail,is_retry:!0,retry_count:e.retry_count+1}):e});this.stack=n,this.lostActionMaps=JSON.parse(X.getSync(D)||"{}"),setTimeout(function(){e.reportLostNum()},1e3)}},{key:"addItem",value:function(e){var t;null==(t=null==this?void 0:this.stack)||t.push(e)}},{key:"removeItems",value:function(e){var t,n=null==(t=null==this?void 0:this.stack)?void 0:t.filter(function(t){return!(null!=e&&e.includes(null==t?void 0:t.action_id))});this.stack=n}},{key:"updateForReportFail",value:function(e){var t;this.stack=null==(t=this.stack)?void 0:t.map(function(t){var n;return null!=e&&e.includes(null==t?void 0:t.action_id)?Object.assign({},t,{inner_status:null==(n=F)?void 0:n.fail,retry_count:t.retry_count+1,is_retry:!0}):t})}},{key:"updateForReporting",value:function(e){var t;this.stack=null==(t=this.stack)?void 0:t.map(function(t){var n;return null!=e&&e.includes(null==t?void 0:t.action_id)?Object.assign({},t,{inner_status:null==(n=F)?void 0:n.reporting}):t})}},{key:"updateAllStack",value:function(e){this.stack=e}},{key:"updateToStorage",value:function(){X.setSync(this.localStorageKey,JSON.stringify(this.stack))}},{key:"updateLostAction",value:function(e){if(e){var t="".concat(e,"_").concat(this.timeStamp),n=this.lostActionMaps[t]||0;this.lostActionMaps[t]=n+1,X.setSync(D,JSON.stringify(this.lostActionMaps))}}},{key:"setTimeStamp",value:function(){this.timeStamp=Date.now().toString()}}]),e}();Pe([Ie],Le.prototype,"getItems",1),Pe([Ie],Le.prototype,"getStorage",1),Pe([Ie],Le.prototype,"reportLostNum",1),Pe([Ie],Le.prototype,"getLostMaps",1),Pe([Ie],Le.prototype,"init",1),Pe([Ie],Le.prototype,"addItem",1),Pe([Ie],Le.prototype,"removeItems",1),Pe([Ie],Le.prototype,"updateForReportFail",1),Pe([Ie],Le.prototype,"updateForReporting",1),Pe([Ie],Le.prototype,"updateAllStack",1),Pe([Ie],Le.prototype,"updateToStorage",1),Pe([Ie],Le.prototype,"updateLostAction",1);var Me=Object.defineProperty,De=Object.getOwnPropertyDescriptor,qe=function(e,t,n,r){for(var o,i=r>1?void 0:r?De(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Me(t,n,i),i},je=function(){k(t,Le);var e=b(t);function t(n){var r,o=n.userActionSetId,i=n.maxLength,a=void 0===i?500:i,u=n.ogEvents,c=void 0===u?[]:u;return O(this,t),(r=e.call(this,{userActionSetId:o,maxLength:a})).ogEvents=c,r}return I(t,[{key:"getReportableActions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=this.getItems(),n=[];return null==t||t.forEach(function(t){var r;(null==n?void 0:n.length)<e&&(null==t?void 0:t.inner_status)!==(null==(r=F)?void 0:r.reporting)&&(null==n||n.push(t))}),n}},{key:"addAction",value:function(e){var t={code:0,message:"成功",actionId:e.action_id},n=this.getItems();if((null==n?void 0:n.length)>=this.maxLength){var r="队列长度超过最大限制".concat(this.maxLength,"条,SDK将按照行为优先级排序,丢弃优先级最低的行为事件");Oe.warn(r),ae({user_action_set_id:this.userActionSetId,log_type:W,message:"队列长度超过限制"});var o=this.sortQueue(e,n);Oe.debug&&Oe.info("超过".concat(this.maxLength,"条按优先级排序的队列:"),o.concat([]));var i=o.pop();this.updateAllStack(o),this.updateLostAction((null==i?void 0:i.session_id)||""),(null==i?void 0:i.action_id)===e.action_id&&(t={code:103,message:"缓存队列已满,主动丢弃行为"})}else this.addItem(e);return this.updateToStorage(),t}},{key:"removeActions",value:function(e){this.removeItems(e),this.updateToStorage()}},{key:"updateActionsForReportFail",value:function(e){this.updateForReportFail(e),this.updateToStorage()}},{key:"updateActionsForReporting",value:function(e){this.updateForReporting(e),this.updateToStorage()}},{key:"getReportableActionsLength",value:function(){var e=this.getItems().filter(function(e){var t;return(null==e?void 0:e.inner_status)!==(null==(t=F)?void 0:t.reporting)});return null==e?void 0:e.length}},{key:"sortQueue",value:function(e,t){var n=this,r={},o=null==e?void 0:e.action_time,i=t.concat([e]),a=function(e){return r[e.action_id]||(r[e.action_id]=n.caculateWeight(o,e)),r[e.action_id]};return i.sort(function(e,t){return a(t)-a(e)})}},{key:"caculateWeight",value:function(e,t){var n,r=0,o=this.formatWeight(e,null==t?void 0:t.action_time),i=o.ogWeight,a=o.sdkWeight,u=o.userWeight;null!=(n=this.ogEvents)&&n.includes(null==t?void 0:t.action_type)&&(r+=i),null!=t&&t.is_sdk_auto_track?r+=a:r+=u;var c=e-(null==t?void 0:t.action_time)+1;return c>0?r+1/c:r}},{key:"formatWeight",value:function(e,t){var n=1e3,r=10,o=100;return e-t>2592e6&&(n/=100,r/=100,o/=100),{ogWeight:n,sdkWeight:r,userWeight:o}}}]),t}();qe([Ie],je.prototype,"getReportableActions",1),qe([Ie],je.prototype,"addAction",1),qe([Ie],je.prototype,"removeActions",1),qe([Ie],je.prototype,"updateActionsForReportFail",1),qe([Ie],je.prototype,"updateActionsForReporting",1),qe([Ie],je.prototype,"getReportableActionsLength",1),qe([Ie],je.prototype,"sortQueue",1),qe([Ie],je.prototype,"caculateWeight",1),qe([Ie],je.prototype,"formatWeight",1);var Ue=function(){function e(){O(this,e),this.events={}}return I(e,[{key:"subscribe",value:function(t,n){e.checkCallback(n),ve(this.events[t])?this.events[t].push(n):this.events[t]=[n]}},{key:"once",value:function(t,n){e.checkCallback(n),this.subscribe(this.onceEventName(t),n)}},{key:"unsubscribe",value:function(t,n){e.checkCallback(n),ve(this.events[t])&&(this.events[t]=this.events[t].filter(function(e){return e!==n})),ve(this.events[this.onceEventName(t)])&&(this.events[this.onceEventName(t)]=this.events[this.onceEventName(t)].filter(function(e){return e!==n}))}},{key:"publish",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Date.now();ve(this.events[e])&&this.events[e].forEach(function(e){return e.apply(void 0,[o].concat(n))}),ve(this.events[this.onceEventName(e)])&&(this.events[this.onceEventName(e)].forEach(function(e){return e.apply(void 0,[o].concat(n))}),this.events[this.onceEventName(e)]=[])}},{key:"onceEventName",value:function(e){return"once_event_prefix_".concat(e)}}],[{key:"checkCallback",value:function(t){he(t)||Oe.error(e.ERROR_CALLBACK_IS_NOT_A_FUNCTION)}}]),e}(),Fe=Ue;Fe.ERROR_CALLBACK_IS_NOT_A_FUNCTION="callback 不是函数";var Ve=new Fe,Be=["REGISTER","VIEW_CONTENT","ADD_TO_CART","PURCHASE","COMPLETE_ORDER","ADD_TO_WISHLIST","START_APP","CREATE_ROLE","AUTHORIZE","TUTORIAL_FINISH","START_PAY","FINISH_PAY"],Ke="START_APP",Ge="TICKET",We="ENTER_FOREGROUND",Je="ENTER_BACKGROUND",He="LOGIN",Qe="SHARE",Ye="TAP_GAME_CLUB",ze="CREATE_GAME_CLUB",$e="JOIN_GAME_ROOM",Ze="FINISH_PAY",Xe="START_PAY",et="ADD_TO_WISHLIST",tt=["REGISTER","START_APP","RE_ACTIVE"],nt=["TICKET","ENTER_FOREGROUND","ENTER_BACKGROUND"],rt=function(){function e(){O(this,e),this.channelClaimActionList=tt,this.noClaimActionList=nt,this.realTimeActionList=V.realTimeActionList,this.ticketInterval=60,this.requestTimeout=V.requestTimeout,this.loadConfig()}return I(e,[{key:"getChannelClaimActionList",value:function(){return this.channelClaimActionList}},{key:"getNoClaimActionList",value:function(){return this.noClaimActionList}},{key:"getRealTimeActionList",value:function(){return this.realTimeActionList}},{key:"getTicketInterval",value:function(){return this.ticketInterval}},{key:"getRequestTimeout",value:function(){return this.requestTimeout}},{key:"loadConfig",value:function(){var e=this;try{if("undefined"==typeof wx)return;var t=X.getSync(j);t&&this.updateConfig(t),ce({conf_name:"mini_game_sdk_common",conf_key:"config"}).then(function(t){t&&pe(t)&&(e.updateConfig(t),X.setSync(j,t))})}catch(t){console.error(t)}}},{key:"updateConfig",value:function(e){e.channelClaimActionList&&ve(e.channelClaimActionList)&&(this.channelClaimActionList=e.channelClaimActionList),e.noClaimActionList&&ve(e.noClaimActionList)&&(this.noClaimActionList=e.noClaimActionList),e.realTimeActionList&&ve(e.realTimeActionList)&&(this.realTimeActionList=e.realTimeActionList),e.ticketInterval&&"number"==typeof e.ticketInterval&&e.ticketInterval>1&&e.ticketInterval!==this.ticketInterval&&(this.ticketInterval=e.ticketInterval,Ve.publish(Z)),e.requestTimeout&&"number"==typeof e.requestTimeout&&e.requestTimeout>5e3&&(this.requestTimeout=e.requestTimeout)}}]),e}(),ot=new rt,it=Ke,at=Ge,ut=We,ct=Je,st=function(){var e=!1,t=!1,n=!0,r=!0,o=!0,i=!1;return function(){if(!i){i=!0;var a=X.getSync(q);if((null==a?void 0:a.bg)===z?e=!0:(null==a?void 0:a.bg)===$&&(e=!1),(null==a?void 0:a.fg)===z?t=!0:(null==a?void 0:a.fg)===$&&(t=!1),(null==a?void 0:a.st)===z?n=!0:(null==a?void 0:a.st)===$&&(n=!1),(null==a?void 0:a.ti)===z?r=!0:(null==a?void 0:a.ti)===$&&(r=!1),Oe.devLog("当前缓存开关 bgOn,fgOn,stOn,tiOn:",e,t,n,r),n&&Ve.publish(it),r){var u=function(){o&&Ve.publish(at)},c=setInterval(u,1e3*ot.getTicketInterval());Ve.subscribe(Z,function(){c&&clearInterval(c),c=setInterval(u,1e3*ot.getTicketInterval())})}wx.onShow(function(e){if(o=!0,t){var n="";try{(n=JSON.stringify(e)).length>1e4&&(n=JSON.stringify({cut:1,scene:e.scene}))}catch(e){}Ve.publish(ut,{enter_options:n})}}),wx.onHide(function(){o=!1,e&&Ve.publish(ct)})}}}(),lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt,pt=ft(function(){var e,t=null;function n(e){return!!e&&("object"==E(e)||"function"==typeof e)}function r(e){if(null!==e&&!n(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var o=Object,i=!(!o.create&&{__proto__:null}instanceof o),a=o.create||(i?function(e){return r(e),{__proto__:e}}:function(e){if(r(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var t=function(){};return t.prototype=e,new t}),u=function(){return null},c=o.getPrototypeOf||([].__proto__===Array.prototype?function(e){var t=e.__proto__;return n(t)?t:null}:u);return e=function(s,l){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!n(s)||!n(l))throw new TypeError("Cannot create proxy with a non-object as target or handler");var f=function(){};t=function(){s=null,f=function(e){throw new TypeError("Cannot perform '".concat(e,"' on a proxy that has been revoked"))}},setTimeout(function(){t=null},0);var d=l;for(var p in l={get:null,set:null,apply:null,construct:null},d){if(!(p in l))throw new TypeError("Proxy polyfill does not support trap '".concat(p,"'"));l[p]=d[p]}"function"==typeof d&&(l.apply=d.apply.bind(d));var v,h=c(s),g=!1,y=!1;"function"==typeof s?(v=function(){var e=this&&this.constructor===v,t=Array.prototype.slice.call(arguments);return f(e?"construct":"apply"),e&&l.construct?l.construct.call(this,s,t):!e&&l.apply?l.apply(s,this,t):e?(t.unshift(s),new(s.bind.apply(s,t))):s.apply(this,t)},g=!0):s instanceof Array?(v=[],y=!0):v=i||null!==h?a(h):{};var m=l.get?function(e){return f("get"),l.get(this,e,v)}:function(e){return f("get"),this[e]},_=l.set?function(e,t){f("set"),l.set(this,e,t,v)}:function(e,t){f("set"),this[e]=t},A=o.getOwnPropertyNames(s),k={};A.forEach(function(e){if(!g&&!y||!(e in v)){var t={enumerable:!!o.getOwnPropertyDescriptor(s,e).enumerable,get:m.bind(s,e),set:_.bind(s,e)};o.defineProperty(v,e,t),k[e]=!0}});var S=!0;if(g||y){var b=o.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return r(t),e.__proto__=t,e}:u);h&&b(v,h)||(S=!1)}if(l.get||!S)for(var T in s)k[T]||o.defineProperty(v,T,{get:m.bind(s,T)});return o.seal(s),o.seal(v),v},e.revocable=function(n,r){return{proxy:new e(n,r),revoke:t}},e}),vt={};try{dt||(dt=pt())}catch(N){_t(N)}function ht(e,t,n,r){try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,t,o){var i,a;r&&mt(function(){return r.apply(void 0,m(o))});var u=!!(null!=(i=o[0])&&i.success||null!=(a=o[0])&&a.fail);u&&["success","fail"].forEach(function(e){if(o[0][e])try{o[0][e]=new dt(o[0][e],{apply:function(t,r,i){return mt(function(){return n.apply(void 0,[e,o[0]].concat(m(i)))}),t.apply(r,i)}})}catch(e){_t(e)}});var c=e.apply(t,o);return!u&&c&&"[object Promise]"===Object.prototype.toString.call(c)?c.then(function(e){return mt(function(){return n("success",o[0],e)}),e}).catch(function(e){throw mt(function(){return n("fail",o[0],e)}),e}):c}})}catch(e){_t(e)}}function gt(e,t,n){try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,t,r){var o="function"==typeof r[0];if(o)try{r[0]=new dt(r[0],{apply:function(e,t,r){var o=e.call.apply(e,[t].concat(m(r)));return mt(function(){return n(o)}),o}})}catch(e){_t(e)}var i=e.call.apply(e,[t].concat(m(r)));return o||mt(function(){return n(i)}),i}})}catch(e){_t(e)}}function yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0;try{if(!dt||null==e||!e[t])return;e[t]=new dt(e[t],{apply:function(e,i,a){var u=e.call.apply(e,[i].concat(m(a)));return(!n||!vt[t])&&(mt(function(){return null==o?void 0:o(u)}),r.forEach(function(e){var t=e.eventName,n=e.isAsync,r=e.proxyEvent;n?ht(u,t,r):gt(u,t,r)})),n&&(vt[t]=!0),u}})}catch(e){_t(e)}}function mt(e){try{e()}catch(e){_t(e)}}function _t(e){ae({log_type:J,message:null==e?void 0:e.message,err_stack:null==e?void 0:e.stack})}var At=He,kt=et,St=Qe,bt=Ye,Tt=ze,wt=$e,Rt=Xe,Et=Ze,Ot=function(){var e=!1;return function(){e||(e=!0,ht(wx,"login",function(e){"success"===e&&Ve.publish(At)}),gt(wx,"onAddToFavorites",function(){Ve.publish(kt)}),gt(wx,"onShareTimeline",function(){Ve.publish(St,{target:"TIME_LINE",trigger:"MENU"})}),gt(wx,"onShareAppMessage",function(){Ve.publish(St,{target:"APP_MESSAGE",trigger:"MENU"})}),gt(wx,"shareAppMessage",function(){Ve.publish(St,{target:"APP_MESSAGE",trigger:"BUTTON"})}),yt(wx,"createGameClubButton",!1,[{isAsync:!1,eventName:"onTap",proxyEvent:function(){Ve.publish(bt)}}],function(){Ve.publish(Tt)}),yt(wx,"getGameServerManager",!0,[{isAsync:!0,eventName:"createRoom",proxyEvent:function(e){"success"===e&&Ve.publish("CREATE_GAME_ROOM")}},{isAsync:!0,eventName:"joinRoom",proxyEvent:function(e){"success"===e&&Ve.publish(wt)}}]),ht(wx,"requestMidasPayment",function(e,t){Ve.publish(Et,{status:"success"===e?"SUCCESS":"FAIL",quantity:(null==t?void 0:t.buyQuantity)||0,mode:(null==t?void 0:t.mode)||"",platform:(null==t?void 0:t.platform)||"",no:(null==t?void 0:t.outTradeNo)||"",payType:"Midas"})},function(e){Ve.publish(Rt,{quantity:(null==e?void 0:e.buyQuantity)||0,mode:(null==e?void 0:e.mode)||"",platform:(null==e?void 0:e.platform)||"",no:(null==e?void 0:e.outTradeNo)||"",payType:"Midas"})}),ht(wx,"requestMidasPaymentGameItem",function(e,t){var n=(t||{}).signData;Ve.publish(Et,{status:"success"===e?"SUCCESS":"FAIL",quantity:(null==n?void 0:n.buyQuantity)||0,mode:(null==n?void 0:n.mode)||"",platform:(null==n?void 0:n.platform)||"",no:(null==n?void 0:n.outTradeNo)||"",p:(null==n?void 0:n.goodsPrice)||0,productId:(null==n?void 0:n.productId)||"",payType:"MidasGameItem"})},function(e){var t=(e||{}).signData;Ve.publish(Rt,{quantity:(null==t?void 0:t.buyQuantity)||0,mode:(null==t?void 0:t.mode)||"",platform:(null==t?void 0:t.platform)||"",no:(null==t?void 0:t.outTradeNo)||"",p:(null==t?void 0:t.goodsPrice)||0,productId:(null==t?void 0:t.productId)||"",payType:"MidasGameItem"})}))}}(),xt=function(){function e(){O(this,e)}return I(e,null,[{key:"isEmpty",value:function(e){return null==e||"string"==typeof e&&""===e.trim()}},{key:"format",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.replace(/\${(\d+)}/g,function(e,t){return n[t]})}},{key:"customStringify",value:function(e){var t=[];try{return JSON.stringify(e,function(e,n){if(void 0===n)return"undefined";if("object"==E(n)&&null!==n){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return"bigint"==typeof n?n.toString():n})}catch(e){return"[Param Error]"}}}]),e}(),It=/^([a-zA-Z][a-zA-Z\d_]{0,63})$/i,Ct=/^ams_reserved_(.*)/i,Nt=function(){function e(){O(this,e)}return I(e,null,[{key:"validateActionType",value:function(t){return xt.isEmpty(t)?(Oe.error(e.ERROR_ACTION_TYPE_NULL),!1):!!It.test(t)||(Oe.error(e.ERROR_ACTION_TYPE_INVALID),!1)}},{key:"validateActionParam",value:function(t){if(!t)return!0;if(!pe(t))return Oe.error(e.ERROR_ACTION_PARAM_IS_NOT_OBJECT),!1;for(var n in t){if(xt.isEmpty(n))return Oe.error(e.ERROR_ACTION_PARAM_KEY_NULL),!1;if(!It.test(n))return Oe.error(e.ERROR_ACTION_PARAM_KEY_INVALID),!1;Ct.test(n)&&Oe.warn(e.WARN_ACTION_PARAM_KEY_RESERVED);var r=t[n];if(!e.isValidValue(r))return Oe.error(xt.format(e.ERROR_ACTION_PARAM_VALUE_INVALID,n,r)),!1;if(ve(r)){if(!e.isValidArrayValue(r)){for(var o=0;o<r.length;o++)Oe.error(xt.format(e.ERROR_ACTION_PARAM_VALUE_ARRAY_INVALID,n,xt.customStringify(r),o,r[o]));return!1}if(!e.checkArrayElementTypes(r))return Oe.error(e.ERROR_ACTION_PARAM_VALUE_ARRAY_TYPE_UNUNIQUE),!1}}return!0}},{key:"isValidValue",value:function(e){return null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||ve(e)}},{key:"isValidArrayValue",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];if("string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n)return!1}return!0}},{key:"checkArrayElementTypes",value:function(e){if(!e||e.length<=1)return!0;for(var t=E(e[0]),n=1;n<e.length;n++)if(E(e[n])!==t)return!1;return!0}}]),e}(),Pt=Nt;Pt.ERROR_ACTION_TYPE_NULL="在track方法中,action_type参数不能为空!",Pt.ERROR_ACTION_TYPE_INVALID="在track方法中,action_type参数只能包含字母、数字和下划线,且只能以字母开头,长度不能超过64个字符!",Pt.ERROR_ACTION_PARAM_KEY_NULL="在track方法中,action_param参数的key不能为空!",Pt.ERROR_ACTION_PARAM_KEY_INVALID="在track方法中,action_param参数的key只能包含字母、数字和下划线,且不能以数字开头,长度不能超过64个字符!",Pt.WARN_ACTION_PARAM_KEY_RESERVED="SDK内部预留参数的key均以'ams_reserved_'开头,该参数的值会被SDK内部覆盖,请不要使用!",Pt.ERROR_ACTION_PARAM_VALUE_INVALID="在track方法中,action_param参数的value必须是String/Number/Boolean/Array中的一种![key=${0}, value=${1}]",Pt.ERROR_ACTION_PARAM_VALUE_ARRAY_INVALID="在track方法中,如果action_param参数中的某个元素的value是Array,那么这个Array中的每个元素必须是String/Number/Boolean中的一种![key=${0}, value=${1}, 数组的第${2}个元素为${3}]",Pt.ERROR_ACTION_PARAM_VALUE_ARRAY_TYPE_UNUNIQUE="在track方法中,如果action_param参数中的某个元素的value是Array,那么这个Array中所有元素的类型必须是同一种!",Pt.ERROR_ACTION_PARAM_IS_NOT_OBJECT="action_param 参数不是Object";var Lt={exports:{}};!function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,o,i,a){return n(function(e,t){return e<<t|e>>>32-t}(n(n(t,e),n(o,a)),i),r)}function o(e,t,n,o,i,a,u){return r(t&n|~t&o,e,t,i,a,u)}function i(e,t,n,o,i,a,u){return r(t&o|n&~o,e,t,i,a,u)}function a(e,t,n,o,i,a,u){return r(t^n^o,e,t,i,a,u)}function u(e,t,n,o,i,a,u){return r(n^(t|~o),e,t,i,a,u)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var r,c,s,l,f,d=1732584193,p=-271733879,v=-1732584194,h=271733878;for(r=0;r<e.length;r+=16)c=d,s=p,l=v,f=h,d=o(d,p,v,h,e[r],7,-680876936),h=o(h,d,p,v,e[r+1],12,-389564586),v=o(v,h,d,p,e[r+2],17,606105819),p=o(p,v,h,d,e[r+3],22,-1044525330),d=o(d,p,v,h,e[r+4],7,-176418897),h=o(h,d,p,v,e[r+5],12,1200080426),v=o(v,h,d,p,e[r+6],17,-1473231341),p=o(p,v,h,d,e[r+7],22,-45705983),d=o(d,p,v,h,e[r+8],7,1770035416),h=o(h,d,p,v,e[r+9],12,-1958414417),v=o(v,h,d,p,e[r+10],17,-42063),p=o(p,v,h,d,e[r+11],22,-1990404162),d=o(d,p,v,h,e[r+12],7,1804603682),h=o(h,d,p,v,e[r+13],12,-40341101),v=o(v,h,d,p,e[r+14],17,-1502002290),d=i(d,p=o(p,v,h,d,e[r+15],22,1236535329),v,h,e[r+1],5,-165796510),h=i(h,d,p,v,e[r+6],9,-1069501632),v=i(v,h,d,p,e[r+11],14,643717713),p=i(p,v,h,d,e[r],20,-373897302),d=i(d,p,v,h,e[r+5],5,-701558691),h=i(h,d,p,v,e[r+10],9,38016083),v=i(v,h,d,p,e[r+15],14,-660478335),p=i(p,v,h,d,e[r+4],20,-405537848),d=i(d,p,v,h,e[r+9],5,568446438),h=i(h,d,p,v,e[r+14],9,-1019803690),v=i(v,h,d,p,e[r+3],14,-187363961),p=i(p,v,h,d,e[r+8],20,1163531501),d=i(d,p,v,h,e[r+13],5,-1444681467),h=i(h,d,p,v,e[r+2],9,-51403784),v=i(v,h,d,p,e[r+7],14,1735328473),d=a(d,p=i(p,v,h,d,e[r+12],20,-1926607734),v,h,e[r+5],4,-378558),h=a(h,d,p,v,e[r+8],11,-2022574463),v=a(v,h,d,p,e[r+11],16,1839030562),p=a(p,v,h,d,e[r+14],23,-35309556),d=a(d,p,v,h,e[r+1],4,-1530992060),h=a(h,d,p,v,e[r+4],11,1272893353),v=a(v,h,d,p,e[r+7],16,-155497632),p=a(p,v,h,d,e[r+10],23,-1094730640),d=a(d,p,v,h,e[r+13],4,681279174),h=a(h,d,p,v,e[r],11,-358537222),v=a(v,h,d,p,e[r+3],16,-722521979),p=a(p,v,h,d,e[r+6],23,76029189),d=a(d,p,v,h,e[r+9],4,-640364487),h=a(h,d,p,v,e[r+12],11,-421815835),v=a(v,h,d,p,e[r+15],16,530742520),d=u(d,p=a(p,v,h,d,e[r+2],23,-995338651),v,h,e[r],6,-198630844),h=u(h,d,p,v,e[r+7],10,1126891415),v=u(v,h,d,p,e[r+14],15,-1416354905),p=u(p,v,h,d,e[r+5],21,-57434055),d=u(d,p,v,h,e[r+12],6,1700485571),h=u(h,d,p,v,e[r+3],10,-1894986606),v=u(v,h,d,p,e[r+10],15,-1051523),p=u(p,v,h,d,e[r+1],21,-2054922799),d=u(d,p,v,h,e[r+8],6,1873313359),h=u(h,d,p,v,e[r+15],10,-30611744),v=u(v,h,d,p,e[r+6],15,-1560198380),p=u(p,v,h,d,e[r+13],21,1309151649),d=u(d,p,v,h,e[r+4],6,-145523070),h=u(h,d,p,v,e[r+11],10,-1120210379),v=u(v,h,d,p,e[r+2],15,718787259),p=u(p,v,h,d,e[r+9],21,-343485551),d=n(d,c),p=n(p,s),v=n(v,l),h=n(h,f);return[d,p,v,h]}function s(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function l(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function f(e){var t,n,r="0123456789abcdef",o="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),o+=r.charAt(t>>>4&15)+r.charAt(15&t);return o}function d(e){return unescape(encodeURIComponent(e))}function p(e){return function(e){return s(c(l(e),8*e.length))}(d(e))}function v(e,t){return function(e,t){var n,r,o=l(e),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=c(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],a[n]=1549556828^o[n];return r=c(i.concat(l(t)),512+8*t.length),s(c(a.concat(r),640))}(d(e),d(t))}function h(e,t,n){return t?n?v(t,e):function(e,t){return f(v(e,t))}(t,e):n?p(e):function(e){return f(p(e))}(e)}e.exports?e.exports=h:t.md5=h}(lt)}(Lt);var Mt=ft(Lt.exports),Dt="function"==typeof btoa,qt="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;var jt,Ut="function"==typeof TextEncoder?new TextEncoder:void 0,Ft=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");jt={},Ft.forEach(function(e,t){return jt[e]=t});var Vt=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);var Bt=Dt?function(e){return btoa(e)}:qt?function(e){return Buffer.from(e,"binary").toString("base64")}:function(e){for(var t,n,r,o,i="",a=e.length%3,u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(r=e.charCodeAt(u++))>255||(o=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");i+=Ft[(t=n<<16|r<<8|o)>>18&63]+Ft[t>>12&63]+Ft[t>>6&63]+Ft[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},Kt=qt?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(Vt.apply(null,e.subarray(n,n+4096)));return Bt(t.join(""))},Gt=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Vt(192|t>>>6)+Vt(128|63&t):Vt(224|t>>>12&15)+Vt(128|t>>>6&63)+Vt(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Vt(240|t>>>18&7)+Vt(128|t>>>12&63)+Vt(128|t>>>6&63)+Vt(128|63&t)},Wt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Jt=qt?function(e){return Buffer.from(e,"utf8").toString("base64")}:Ut?function(e){return Kt(Ut.encode(e))}:function(e){return Bt(function(e){return e.replace(Wt,Gt)}(e))},Ht=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Yt=function(e,t,n,r){for(var o,i=r>1?void 0:r?Qt(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ht(t,n,i),i},zt=function(){function e(t){var n=this;O(this,e),this.cgiBatchSize=V.cgiBatchSize,this.reportThreshold=V.reportThreshold,this.reportDelay=V.reportDelay,this.triggerExecuteSend=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[];return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return clearTimeout(t),t=setTimeout(function(){var t=e.apply(void 0,i);r.forEach(function(e){return e(t)}),r=[]},n),new Promise(function(e){return r.push(e)})}}(function(){n.executeSend()},1e3*this.reportDelay),this.inspectDelay=V.inspectDelay,this.inspectTimer=void 0,this.isNeedContinueSend=!1,this.getBaseInfo=t.getBaseInfo,this.reportLog=t.reportLog,this.queueManager=t.queueManager,this.configManager=t.configManager,this.onReportComplete=t.onReportComplete,this.onReportFail=t.onReportFail,this.flushSend(),this.startInspectTimer()}return I(e,[{key:"batchSend",value:function(){var e,t=this.queueManager.getReportableActions(this.reportThreshold);if(t.length>=this.reportThreshold)this.executeSend();else{var n=(null==(e=this.configManager)?void 0:e.getRealTimeActionList())||V.realTimeActionList;t.some(function(e){return n.indexOf(e.action_type)>-1&&!e.is_retry})?this.executeSend():this.triggerExecuteSend()}this.startInspectTimer()}},{key:"flushSend",value:function(){this.executeSend()}},{key:"executeSend",value:function(){var t=this;if(e.currentRequestCount>=e.requestConcurrency)this.isNeedContinueSend=!0;else{this.isNeedContinueSend=!1;var n=(e.requestConcurrency-e.currentRequestCount)*this.cgiBatchSize,r=this.queueManager.getReportableActions(n),o=this.getBaseInfo();if(!o.openid&&!o.unionid&&(Oe.warn("请尽快调用 setOpenId 或 setUnionId 方法设置用户ID!"),r=r.filter(function(e){return null==e?void 0:e.ad_trace_id})),!(r.length<=0)){n<this.queueManager.getReportableActionsLength()&&(this.isNeedContinueSend=!0),e.currentRequestCount+=Math.ceil(r.length/this.cgiBatchSize);for(var i=[],a=0;a<r.length;a+=this.cgiBatchSize){var u=this.generateActionReportParams(r.slice(a,a+this.cgiBatchSize));i.push(this.report(u))}Promise.all(i).then(function(e){var n=e.some(function(e){return e>=0});t.isNeedContinueSend&&n&&t.executeSend()}).catch(function(e){Oe.error(e),t.reportLog({message:"executeSend catch: ".concat(e.message),log_type:B,err_stack:e.stack})})}}}},{key:"generateActionReportParams",value:function(e){var t=[],n=[],r=this.getBaseInfo();return e.forEach(function(e){n.push(e.action_id);var r=Object.assign({},e);delete r.inner_status,t.push(r)}),{data:{info:r,actions:t},actionIdList:n}}},{key:"dealSuccessData",value:function(e,t,n){[51001,51003].indexOf(null==e?void 0:e.code)>-1?this.queueManager.updateActionsForReportFail(t):this.queueManager.removeActions(t),0!==(null==e?void 0:e.code)&&(this.reportLog({log_type:K,code:null==e?void 0:e.code,message:"trace_id: ".concat(null==e?void 0:e.trace_id,",msg: ").concat(null==e?void 0:e.message)}),Oe.error("上报失败:",e)),this.doTrackCallbackFn(this.onReportComplete,e,n),-1===[0,51001,51003].indexOf(null==e?void 0:e.code)&&this.doTrackCallbackFn(this.onReportFail,e,n)}},{key:"dealFailData",value:function(e,t,n){this.queueManager.updateActionsForReportFail(t),this.reportLog({log_type:K,code:e.code,message:e.message}),Oe.error("上报失败:",e),this.doTrackCallbackFn(this.onReportComplete,e,n)}},{key:"report",value:function(t){var n=this,r=t.data,o=t.actionIdList;return this.queueManager.updateActionsForReporting(o),Oe.debug&&(Oe.info("上报行为类型: ","【".concat(r.actions.map(function(e){return e.action_type}).join("、"),"】")),Oe.info("上报请求参数: ",r)),new Promise(function(t){var i,a,u,c,s,l,f,d,p=Date.now();try{var v=function(e){var t="",n=null==e?void 0:e.appid,r=null==e?void 0:e.secret_key,o=null==e?void 0:e.sdk_version,i=null==e?void 0:e.timestamp;if(!(n&&r&&o&&i&&32===r.length))return t;for(var a=Mt(o+n+i),u=0;u<32;u++)t+=u%2==0?r[u]:a[u];return t}({appid:null==(i=null==r?void 0:r.info)?void 0:i.appid,secret_key:null==(a=null==r?void 0:r.info)?void 0:a.secret_key,sdk_version:null==(u=null==r?void 0:r.info)?void 0:u.sdk_version,timestamp:p}),h=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})}(Jt(e)):Jt(e)}(JSON.stringify(r));f={"Client-Time":p,"Sign-Value":Mt(h+(null==(c=null==r?void 0:r.info)?void 0:c.user_action_set_id)+(null==(s=null==r?void 0:r.info)?void 0:s.secret_key)+v),"Sign-Version":V.signVersion,"content-type":"text/plain;charset=UTF-8"},d=h}catch(v){f={"Client-Time":p},d=r,n.reportLog({log_type:Q,message:"sign error msg: ".concat(null==v?void 0:v.message),err_stack:null==v?void 0:v.stack}),Oe.error(v)}wx.request({url:"https://api.datanexus.qq.com/data-nexus-cgi/miniprogram",method:"POST",timeout:(null==(l=n.configManager)?void 0:l.getRequestTimeout())||V.requestTimeout,header:f,data:d,success:function(i){var a,u;Oe.devLog("上报接口返回码:",null==(a=null==i?void 0:i.data)?void 0:a.code);var c=(null==(u=null==i?void 0:i.header)?void 0:u["Server-Time"])||-1;if(ue.revise(c),e.currentRequestCount-=1,200===(null==i?void 0:i.statusCode))return n.dealSuccessData(null==i?void 0:i.data,o,r),void t((null==i?void 0:i.data).code);var s="";try{s="object"==E(null==i?void 0:i.data)?JSON.stringify(null==i?void 0:i.data):null==i?void 0:i.data}catch(e){Oe.error(e)}var l={code:"number"==typeof(null==i?void 0:i.statusCode)?-1*i.statusCode:-888,message:"statusCode: ".concat(null==i?void 0:i.statusCode,", data: ").concat(s)};n.dealFailData(l,o,r),t(l.code)},fail:function(i){Oe.devLog("上报失败:",i),e.currentRequestCount-=1;var a={code:"number"==typeof(null==i?void 0:i.errno)?-1*i.errno:-999,message:null==i?void 0:i.errMsg};n.dealFailData(a,o,r),t(a.code)}})})}},{key:"startInspectTimer",value:function(){var t=this;clearTimeout(this.inspectTimer),this.inspectTimer=setTimeout(function(){e.currentRequestCount>=e.requestConcurrency&&(e.currentRequestCount=e.requestConcurrency-1),t.executeSend(),t.startInspectTimer()},1e3*this.inspectDelay)}},{key:"doTrackCallbackFn",value:function(e,t,n){if("function"==typeof e)try{for(var r=[],o=0;o<n.actions.length;o++)if(!n.actions[o].is_sdk_auto_track){var i=n.actions[o],a=i.action_type,u=i.action_param,c=i.action_id,s=i.action_time;r.push({action_type:a,action_param:u,action_id:c,action_time:s})}if(r.length){var l=n.info,f=l.user_action_set_id,d=l.appid,p=l.openid,v=l.unionid,h=l.user_unique_id;e({code:null==t?void 0:t.code,message:null==t?void 0:t.message,data:{actions:r,info:{user_action_set_id:f,appid:d,openid:p,unionid:v,user_unique_id:h}}})}}catch(r){Oe.error("返回上报回调数据异常:",r)}}}],[{key:"setRequestConcurrency",value:function(t){"number"==typeof t?t<1?Oe.error("网络请求最大并发量不能小于1"):t>10?Oe.error("网络请求最大并发量不能大于10"):e.requestConcurrency=t:Oe.error("网络请求最大并发量需设置为数字")}}]),e}(),$t=zt;$t.currentRequestCount=0,$t.requestConcurrency=V.requestConcurrency,Yt([Ie],$t.prototype,"batchSend",1),Yt([Ie],$t.prototype,"flushSend",1),Yt([Ie],$t.prototype,"executeSend",1);var Zt=Ke,Xt=Ge,en=We,tn=Je,nn=He,rn=et,on=Qe,an=Ye,un=ze,cn=$e,sn=Xe,ln=Ze,fn=function(){function e(){O(this,e)}return I(e,[{key:"install",value:function(e,t){var n=function(t){Ve.subscribe(t,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.track(t,Object.assign(n||{},o,y(y({},Tn,!0),wn,r)))}}(t))};n(Xt),n(Zt),n(en),n(tn),"all"===t&&(n(nn),n(rn),n(on),n(un),n(an),n("CREATE_GAME_ROOM"),n(cn),n(sn),n(ln))}}]),e}(),dn=function(){function e(){O(this,e),this.special_method_symbol=Symbol("special_method_symbol")}return I(e,[{key:"onPurchase",value:function(e){return"number"!=typeof e&&Oe.warn("付费金额需要为数字"),e<=0&&Oe.warn("付费金额需要大于0"),this.wrapTrack("PURCHASE",{value:e})}},{key:"onEnterForeground",value:function(){return this.wrapTrack("ENTER_FOREGROUND")}},{key:"onEnterBackground",value:function(){return this.wrapTrack("ENTER_BACKGROUND")}},{key:"onAppStart",value:function(){return this.wrapTrack("START_APP")}},{key:"onAppQuit",value:function(){return this.wrapTrack("APP_QUIT")}},{key:"onAddToWishlist",value:function(){return this.wrapTrack("ADD_TO_WISHLIST")}},{key:"wrapTrack",value:function(e,t){return this.track(e,Object.assign(t||{},y({},this.special_method_symbol,1)))}}]),e}(),pn=function(){k(t,dn);var e=b(t);function t(){return O(this,t),e.apply(this,arguments)}return I(t,[{key:"onRegister",value:function(){return this.wrapTrack("REGISTER")}},{key:"onCreateRole",value:function(e){return e&&"string"!=typeof e&&Oe.warn("角色名称需要为字符串"),this.wrapTrack("CREATE_ROLE",e?{name:e}:{})}},{key:"onTutorialFinish",value:function(){return this.wrapTrack("TUTORIAL_FINISH")}}]),t}(),vn="(如果确认无误,请忽略该提示)",hn=function(){var e=[];return{requestActionList:function(){try{ce({conf_name:"data_nexus_common",conf_key:"action_types"}).then(function(t){ve(t)&&(e=t)})}catch(e){Oe.error(e)}},getActionList:function(){return e}}}();function gn(e,t){try{e.is_sdk_auto_track||(function(e){try{var t=hn.getActionList();if(!t.includes(e)){var n,r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(yn(o,e)<=parseInt((.3*o.length).toString())){Oe.warn("通过SDK上报的".concat(e,"行为名称可能有误,请检查该行为类型是否为腾讯广告提供的标准行为!").concat(vn));break}}}catch(e){r.e(e)}finally{r.f()}}}catch(t){Oe.error(t)}}(e.action_type),"minigame"===t?function(e,t){var n,r,o;try{["PURCHASE","ADD_TO_CART"].includes(e.action_type)&&e.action_param&&we(e.action_param,"value")&&("number"!=typeof(null==(n=e.action_param)?void 0:n.value)?Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数需要为数字!")):(null==(r=e.action_param)?void 0:r.value)<=0?Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数需要大于0!")):"minigame"===t&&(null==(o=e.action_param)?void 0:o.value)<100&&Oe.warn("通过SDK上报的".concat(e.action_type,"行为携带的金额参数可能有误,金额的单位为‘分’,请检查金额是否正确!").concat(vn)))}catch(e){Oe.error(e)}}(e,t):"miniprogram"===t&&function(e){try{var t=null==e?void 0:e.action_type,n=(null==e?void 0:e.action_param)||{};"PURCHASE"===t&&we(n,"value")&&("number"!=typeof(null==n?void 0:n.value)?Oe.warn("通过SDK上报的".concat(t,"行为携带的金额参数需要为数字!")):(null==n?void 0:n.value)<=0&&Oe.warn("通过SDK上报的".concat(t,"行为携带的金额参数需要大于0!")))}catch(t){Oe.error(t)}}(e))}catch(e){Oe.error(e)}}function yn(e,t){try{if(0===e.length)return t.length;if(0===t.length)return e.length;for(var n=[],r=0;r<=t.length;r++)n[r]=[r];for(var o=0;o<=e.length;o++)n[0][o]=o;for(var i=1;i<=t.length;i++)for(var a=1;a<=e.length;a++)t.charAt(i-1)===e.charAt(a-1)?n[i][a]=n[i-1][a-1]:n[i][a]=Math.min(n[i-1][a-1]+1,n[i][a-1]+1,n[i-1][a]+1);return n[t.length][e.length]}catch(n){Oe.error(n)}}function mn(e){try{e&&!/^[a-zA-Z0-9_\-]+$/.test(e)&&Oe.warn("通过SDK上报的openid:".concat(e,"可能有误,请检查openid是否正确!").concat(vn))}catch(e){Oe.error(e)}}var _n,An=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,Sn=function(e,t,n,r){for(var o,i=r>1?void 0:r?kn(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&An(t,n,i),i},bn=Symbol("initializedInstance"),Tn=Symbol("autoTrack"),wn=Symbol("actionTime"),Rn=function(){k(t,pn);var e=b(t);function t(n){var r;if(O(this,t),(r=e.call(this)).env="production",r.sdk_version="1.5.5",r.sdk_name="@dn-sdk/minigame",r.deviceInfo={},r.gameInfo={},r.session_id="",r.log_id=0,r.inited=!1,r.initErrMsg="",null==wx||!wx.createCanvas)return r.initErrMsg="不支持非微信小游戏中使用",Oe.error(r.initErrMsg),T(r);var o=Te();if(t[bn].length>=o.maxSdkInstance)return r.initErrMsg="初始化超过上限",Oe.error(r.initErrMsg),T(r);var i=function(e){return pe(e)?(function(e){var t=["user_action_set_id","secret_key","appid","openid","unionid","user_unique_id","auto_track","auto_attr","on_report_fail","on_report_complete"];for(var n in e)t.includes(n)||Oe.warn("Invalid property '".concat(n,"' found in config"))}(e),"number"!=typeof e.user_action_set_id?"user_action_set_id 参数需为 number 类型":e.user_action_set_id<=0?"user_action_set_id 参数需大于 0":"string"!=typeof e.secret_key?"secret_key 参数需为 string 类型":""===e.secret_key.trim()?"缺少 secret_key 参数":32!==e.secret_key.length?"secret_key 参数需为 32 位字符串":"string"!=typeof e.appid?"appid 参数需为 string 类型":""!==e.appid.trim()||"缺少 appid"):"初始化参数需为 object 类型"}(n),a=oe();if(!0!==i)return r.initErrMsg=i,Oe.error(i),T(r);var u=null==a?void 0:a.appId;if(u&&u!==n.appid)return r.initErrMsg="初始化传入的appid与当前小游戏appid不一致",Oe.error(r.initErrMsg),T(r);r.config=n,we(n,"auto_track")||(r.config.auto_track=be("autoTrack")),r.openid=n.openid,r.unionid=n.unionid,r.user_unique_id=n.user_unique_id,r.onReportComplete=n.on_report_complete,r.onReportFail=n.on_report_fail,r.saveValidOpenidToStorage();var c=n.user_action_set_id;return t[bn].includes(c)?(r.initErrMsg="同个数据源[".concat(c,"]只能初始化一次"),Oe.error(r.initErrMsg),r.reportLog({log_type:B,message:r.initErrMsg}),T(r)):(r.reportLog=r.reportLog.bind(w(r)),r.getTrackBaseInfo=r.getTrackBaseInfo.bind(w(r)),r.deviceInfo=ee(),r.gameInfo=xe(),r.session_id=ye(),r.queueManage=new je({userActionSetId:c,maxLength:o.maxQueueLength,ogEvents:Be}),r.actionReporter=new $t({getBaseInfo:r.getTrackBaseInfo,reportLog:r.reportLog,queueManager:r.queueManage,configManager:ot,onReportComplete:r.onReportComplete,onReportFail:r.onReportFail}),r.inited=!0,t[bn].push(c),r.useAutoTrack(),r.doReportOnEnterBackground(),"release"===(null==a?void 0:a.envVersion)?(Oe.info("初始化成功"),T(r)):(function(e){var t=e.sdk_version,n=e.default_download_url,r=e.fail_handler;ce({conf_name:e.conf_name,conf_key:e.conf_key}).then(function(e){if(pe(e)){var o=null==e?void 0:e.blackVersions,i=null==e?void 0:e.minVersion,a=null==e?void 0:e.bestVersion,u=null==e?void 0:e.downloadUrl,c=n;return u&&/^https/.test(u)&&(c=u),ve(o)&&(null==o?void 0:o.indexOf(t))>-1?(null==r||r(),void Oe.error("初始化失败!当前SDK版本存在兼容问题,请尽快升级至最新版!下载地址:".concat(c))):i&&Se(t,i)<0?(null==r||r(),void Oe.error("初始化失败!当前SDK版本过低,请尽快升级至最新版!下载地址:".concat(c))):(a&&Se(t,a)<0&&Oe.warn("新版本SDK已上线,强烈建议您升级至最新版,尽早享受新特性!下载地址:".concat(c)),void Oe.info("初始化成功"))}Oe.info("初始化成功")}).catch(function(){Oe.info("初始化成功")})}({conf_name:"mini_game_sdk_common",conf_key:"version",sdk_version:r.sdk_version,default_download_url:"https://sr-home-1257214331.cos.ap-guangzhou.myqcloud.com/sdk/dn-sdk-minigame/dn-sdk-minigame.zip",fail_handler:function(){r.inited=!1}}),hn.requestActionList(),mn(n.openid),T(r)))}return I(t,[{key:"getInitResult",value:function(){return{inited:this.inited,initErrMsg:this.initErrMsg}}},{key:"track",value:function(e,t){var n,r;if(!this.inited||!this.queueManage)return Oe.error("上报失败,请先完成初始化"),{code:100,message:"未完成初始化或重复初始化导致初始化失败,请先完成初始化"};var o=Pt.validateActionType(e),i=Pt.validateActionParam(t);if(o&&i){!this.openid&&!this.unionid&&Oe.warn("缺少 openid 或 unionid");var a=be("actionParamMaxLength");if(JSON.stringify(t||{}).length>a)return Oe.error("监测到超过".concat(a,"的上报日志:").concat(e," ").concat(t)),{code:102,message:"action_param 参数过大,不能超过 ".concat(a," 字符")};var u=!(null==t||!t[Tn]),c=this.createAction(e,t||{},u);"release"!==(null==(n=oe())?void 0:n.envVersion)&&gn(c,"minigame");var s=this.queueManage.addAction(c);return null==(r=this.actionReporter)||r.batchSend(),s}return{code:101,message:"action_type 或 action_param 参数错误"}}},{key:"flush",value:function(){var e;null==(e=this.actionReporter)||e.flushSend()}},{key:"setOpenId",value:function(e){var t;if(e&&"string"==typeof e)return this.openid=e,this.gameInfo.ad_trace_id&&!X.getSync(U)&&Ve.publish("START_APP"),this.flush(),this.saveValidOpenidToStorage(),"release"!==(null==(t=oe())?void 0:t.envVersion)&&mn(e),{code:0,message:"成功"};var n="openid 格式错误";return Oe.error(n),{code:101,message:n}}},{key:"setUnionId",value:function(e){if(e&&"string"==typeof e)return this.unionid=e,this.flush(),{code:0,message:"成功"};var t="unionid 格式错误";return Oe.error(t),{code:101,message:t}}},{key:"setUserUniqueId",value:function(e){if(e&&"string"==typeof e)return this.user_unique_id=e,{code:0,message:"成功"};var t="user_unique_id 格式错误";return Oe.error(t),{code:101,message:t}}},{key:"doReportOnEnterBackground",value:function(){var e=this;wx.onHide(function(){var t,n;null==(t=e.actionReporter)||t.flushSend(),null==(n=e.queueManage)||n.reportLostNum()})}},{key:"getTrackBaseInfo",value:function(){var e=oe();return Object.assign({},this.deviceInfo,function(e){var t={};return["user_action_set_id","appid","openid","secret_key","user_unique_id","unionid"].forEach(function(n){we(e,n)&&(t[n]=e[n])}),t}(this.config),{local_id:te(),sdk_name:this.sdk_name,sdk_version:this.sdk_version,openid:this.openid||re(),unionid:this.unionid,user_unique_id:this.user_unique_id,inner_param:{app_env_version:e.envVersion,app_version:e.version}})}},{key:"createAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null!=t&&t[Tn]&&delete t[Tn];var r=Date.now();null!=t&&t[wn]&&(r=null==t?void 0:t[wn],delete t[wn]);var o={action_id:ye(),action_param:t,action_time:r,action_type:e,is_retry:!1,is_sdk_auto_track:n,retry_count:0,revised_action_time:ue.getRevisedcurrentTimeMillis(),log_id:++this.log_id,session_id:this.session_id,pkg_channel_id:this.gameInfo.pkg_channel_id,source_scene:this.gameInfo.source_scene,network_type:ne(),ad_trace_id:this.gameInfo.ad_trace_id,channel:this.getChannelByActionType(e)};return null!=t&&t[this.special_method_symbol]&&(this.addActionInnerParam(o,"is_special_method",!0),delete t[this.special_method_symbol]),ot.getChannelClaimActionList().indexOf(e)>-1&&this.gameInfo.launch_options&&this.addActionInnerParam(o,"launch_options",this.gameInfo.launch_options),o}},{key:"addActionInnerParam",value:function(e,t,n){e.inner_param&&pe(e.inner_param)?e.inner_param[t]=n:e.inner_param=y({},t,n)}},{key:"getChannelByActionType",value:function(e){var t="";return ot.getChannelClaimActionList().indexOf(e)>-1?t=this.gameInfo.channel||"":ot.getNoClaimActionList().indexOf(e)>-1&&(t="UNKNOWN"),t}},{key:"reportLog",value:function(e){var t,n,r={user_action_set_id:null==(t=this.config)?void 0:t.user_action_set_id,appid:null==(n=this.config)?void 0:n.appid,session_id:this.session_id};ae(Object.assign(r,e))}},{key:"useAutoTrack",value:function(){var e;if(null!=(e=this.config)&&e.auto_track){var t=!0,n=X.getSync(q);(null==n?void 0:n.ap)===z?t=!0:(null==n?void 0:n.ap)===$&&(t=!1),"devtools"===ee().wx_platform&&(t=!0),(new fn).install(this,t?"all":"lifecycle"),st(),t&&Ot(),this.getAutoProxyRemoteConfig()}}},{key:"getAutoProxyRemoteConfig",value:function(){var e,t,n=ee();n.os&&n.os_version&&null!=(e=this.config)&&e.user_action_set_id&&function(e){return new Promise(function(t){wx.request({method:"POST",url:"https://api.datanexus.qq.com/data-nexus-config/v1/sdk/minigame/get",data:e,timeout:V.requestTimeout,success:function(e){se(e,t,"minigame/get"),fe(e)},fail:function(e){le(e,"minigame/get")}})})}({conf_name:"MG",conf_param:{user_action_set_id:null==(t=this.config)?void 0:t.user_action_set_id,sdk_version:this.sdk_version,os_type:(null==n?void 0:n.os)||"",os_version:Re(n.os_version),device_brand:(null==n?void 0:n.device_brand)||"",weixin_lib_version:(null==n?void 0:n.wx_lib_version)||"",weixin_version:(null==n?void 0:n.wx_version)||""}}).then(function(e){pe(e)&&X.setSync(q,e)})}},{key:"saveValidOpenidToStorage",value:function(){this.openid&&function(e){return/^[a-zA-Z0-9_-]{28,30}$/.test(e)}(this.openid)&&X.setSync(U,this.openid)}}],[{key:"setRequestConcurrency",value:function(e){$t.setRequestConcurrency(e)}},{key:"setDebug",value:function(e){Oe.debug=e}}]),t}(),En=Rn;En[bn]=[],Sn([Ie],En.prototype,"track",1),Sn([Ie,function(e,t,n){var r=n.value;return n.value=function(){if(this.inited){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}Oe.error("上报失败,请先完成初始化")},n}],En.prototype,"flush",1),Sn([Ie],En.prototype,"setOpenId",1),Sn([Ie],En.prototype,"setUnionId",1),Sn([Ie],En.prototype,"setUserUniqueId",1),Sn([Ie],En.prototype,"doReportOnEnterBackground",1),Sn([Ie],En.prototype,"getTrackBaseInfo",1),Sn([Ie],En.prototype,"useAutoTrack",1);var On=0,xn={moid:""},In=!1,Cn=JSON.stringify(wx.getLaunchOptionsSync()||""),Nn={token:"",uid:"",uname:"",openid:""},Pn={partner_id:"",game_id:"",pkg_name:"",version:""},Ln={doid:"",dsid:"",dsname:"",dext:"",drid:"",drname:"",drlevel:"",dmoney:"",money:""},Mn="wx-adapter sdk >>>>>>>:";wx.hideShareMenu(),wx.onShow(function(e){e.query&&(Cn=JSON.stringify(e))});var Dn=function(e){var t=n(n({},v()),d),r=l(n(n(n(n(n({},Ln),Nn),Pn),t),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgamemds/index/",r).then(function(t){t.state&&(t.data.balance>=e?jn(""):qn(t.data))}).catch(function(e){console.log(e)})},qn=function(e){wx.requestMidasPayment({mode:"game",env:e.env,offerId:e.offerId,currencyType:e.currencyType,platform:e.platform,buyQuantity:e.buyQuantity,outTradeNo:xn.moid}).then(function(t){_n&&_n.onPurchase(100*e.buyQuantity),jn(t)}).catch(function(e){console.log(e)})},jn=function(e){var t;On++;var r=n(n({},v()),d);t=l(e?n(n(n(n(n(n({},Ln),Pn),Nn),r),xn),{},{res:JSON.stringify(e),launchoption:Cn,onshow:Cn}):n(n(n(n(n(n({},Ln),Pn),Nn),xn),r),{},{launchoption:Cn,onshow:Cn})),c(u,"/wxgamemds/send/",t).then(function(e){console.log(e)}).catch(function(t){console.log(t),On<3&&setTimeout(function(){jn(e)},1e3)})},Un=function(e){return new Promise(function(t,r){var o=Nn||{},i=o.token,s=o.uid,f=o.uname;if(!(In&&i&&s&&f))return a("未激活或未登录,请重新进入游戏"),r({state:100001,msg:"未激活或未登录,请检查"});var p=l(n(n(n(n(n({},e),Nn),Pn),n(n({},v()),d)),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgameevent/index/",p).then(function(){t(),_n&&("create"===p.event&&_n.onCreateRole(p.drname),"levelup"===p.event&&_n.track("UPDATE_LEVEL",{level:p.drlevel,power:0}))}).catch(function(e){console.log(e),r({state:100002,msg:"角色上报失败"})})})};exports.jf_active=function(e){return new Promise(function(t,n){if(!e)return n({state:100001,msg:"激活入参缺失"});if(null==e||!e.wx)return n({state:100002,msg:"激活入参 wx 属性缺失"});var r=e.wx,o=r.game_id,i=r.version,a=r.dn_sdk_id,u=r.dn_secret_key;if(!o)return n({state:100003,msg:"激活入参 game_id 属性缺失"});Pn.game_id=o,Pn.version=i,Pn.pkg_name="wxgame",Pn.partner_id=4,In=!0,console.log("active 激活成功!"),a&&u&&function(e){var t=e.dn_sdk_id,n=e.dn_secret_key,r=e.app_id,o=(_n=new En({appid:r,secret_key:n,user_action_set_id:t})).getInitResult();null!=o&&o.inited||console.error("dnSdk init failed: ",o.initErrMsg),_n.onAppStart(),wx.onAddToFavorites(function(e){console.log(Mn+"click onAddToFavorites"),_n&&_n.track("DD_TO_WISHLIST",{type:"default"})}),wx.onShareAppMessage(function(){console.log(Mn+"click onShareAppMessage"),_n&&_n.track("SHARE",{target:"APP_MESSAGE"})}),wx.onShareTimeline(function(){console.log(Mn+"click onShareTimeline"),_n&&_n.track("SHARE",{target:"TIME_LINE"})}),console.log(Mn+"广点通初始化成功!")}(wx),t()})},exports.jf_createRewardedVideoAd=function(e){var t=null,n=!1,r=!1,o=function(){return n||r?Promise.resolve():(n=!0,new Promise(function(o,i){(t=wx.createRewardedVideoAd({adUnitId:e})).onError(function(e){n=!1,r=!1,t=null,i({state:100004,msg:"广告平台异常",originalErr:e})}),t.load().then(function(){r=!0,n=!1,o()}).catch(function(e){console.log(399),n=!1,r=!1,t=null,i(e)})}))},i=function(){return r?new Promise(function(e,n){t?(t.onClose(function(e){console.log("广告关闭:",e.isEnded?"正常播放完成":"用户提前关闭")}),t.show().then(function(){console.log("激励视频广告展示成功"),e()}).catch(function(e){r=!1,n({state:100003,msg:JSON.stringify(e)})})):n({state:100002,msg:"广告实例不存在"})}):o().then(i).catch(function(e){return Promise.reject({state:100001,msg:JSON.stringify(e)})})};return{preload:o,show:i}},exports.jf_customerService=function(e){wx.openCustomerServiceConversation({success:function(){Un(n(n({},f(e)),{},{event:"kfclick"}))}})},exports.jf_getUserInfo=function(){return new Promise(function(e,t){wx.getSetting({success:function(n){n.authSetting["scope.userInfo"]?wx.getUserInfo({success:function(t){return e(t.userInfo)},fail:function(e){return t({state:100001,msg:JSON.stringify(e)})}}):wx.getUserProfile({desc:"获取用户信息",success:function(t){return e(t.userInfo)},fail:function(e){return t({state:100002,msg:JSON.stringify(e)})}})}})})},exports.jf_login=function(){return new Promise(function(e,t){if(!In)return t({state:100003,msg:"登录前请先激活"});wx.login({success:function(r){var o=l(n(n(n({code:r.code},Pn),g()),{},{launchoption:Cn,onshow:Cn}));c(u,"/wxgamelogin/initlogin/",o).then(function(n){if(1==n.state){var r=n.data,o=r.token,i=r.uid,u=r.uname,c=r.openid,s=r.show_page;if(Nn.token=o,Nn.uid=i,Nn.uname=u,Nn.openid=c,e({token:o,uid:i,uname:u,partner_id:4,show_page:s}),console.log(Mn+"登录成功"),c&&_n){var l=n||{},f=l.backFlowDay,d=l.isRegisterUser;!function(e){var t=e.openid,n=e.nsSdk,r=e.backFlowDay,o=e.isRegisterUser;if(n.setOpenId(t),o)return n.onRegister();if(!r)return n.track("RE_ACTIVE");var i=r>=30?30:r>=14?14:r>=7?7:void 0;n.track("RE_ACTIVE",i?{backFlowDay:i}:{})}({openid:c,nsSdk:_n,backFlowDay:f,isRegisterUser:d})}}else a(n.msg),t({state:n.state,msg:n.msg})}).catch(function(e){a(e),t({state:100001,msg:e})})},fail:function(e){t({state:100002,msg:e})}})})},exports.jf_pay=function(e){return new Promise(function(t,r){var o=Nn||{},i=o.token,s=o.uid,p=o.uname;if(!(In&&i&&s&&p))return a("失败!请先激活登录"),r({state:100001,msg:"未激活或未登录,请重新进入游戏"});wx.showLoading({title:"加载中"});var y=e.dmoney;(Ln=f(e)||{}).money=y;var m=l(n(n(n(n(n({},e),Pn),Nn),n(n(n({},v()),h()),d)),{},{money:y,launchoption:Cn,onshow:Cn}));c(u,"/wxgameorder/index/",m).then(function(e){var n=e||{},o=n.state,i=n.msg,s=n.data,f=void 0===s?{}:s;if(1==o){var d=f.aid,p=f.moid,v=f.thumb_url;xn.moid=p,1==d?(Dn(y),t({msg:"ok"})):2==d?wx.showModal({title:"支付提示",content:"即将打开充值入口,输入“充值”或点击右下角卡片即可充值。",showCancel:!1,confirmText:"点我充值",success:function(e){e.confirm?wx.openCustomerServiceConversation({sessionFrom:p,sendMessagePath:"/path/index/index?moid="+p,showMessageCard:!0,sendMessageImg:v,success:function(e){console.log("openCustomerServiceConversation success",e),t()},fail:function(e){console.error("openCustomerServiceConversation fail ",e),r({state:100003,msg:"支付失败"})},complete:function(e){console.log("openCustomerServiceConversation compelte: ",p),function(e){var t=g(),n=l({partner_id:Pn.partner_id,pkg_name:Pn.pkg_name,game_id:Pn.game_id,uid:Nn.uid,openid:Nn.openid,token:Nn.token,uname:Nn.uname,duid:t.duid,moid:e});c(u,"/wxgameorder/get/",n).then(function(e){1==e.data.status&&_n.onPurchase(100*e.data.money)})}(p)}}):(a("用户取消支付"),r({state:100005,msg:"取消支付"}))},fail:function(){a("用户取消支付"),r({state:100006,msg:"支付失败"})}}):(a("失败!设备未识别"),r({state:100004,msg:"支付失败"}))}else a(i),r({state:o,msg:i});wx.hideLoading()}).catch(function(e){a(e),r({state:100002,msg:"支付失败"}),wx.hideLoading()})})},exports.jf_profanityCheck=function(e){return new Promise(function(t,r){var o=l(n(n(n(n(n({},e),Pn),Nn),g()),{},{launchoption:Cn,onshow:Cn,partner_id:4}));c(u,"/wxgamesafe/verify/",o).then(function(e){var n=e.data,o=n.code,i=n.msg;1==o?t():r({state:100001,msg:i})}).catch(function(e){r({state:100002,msg:e})})})},exports.jf_share=function(e){wx.shareAppMessage(),Un(n(n({},f(e)),{},{event:"fxclick"}))},exports.jf_showInterstitialAd=function(e){return new Promise(function(t,n){var r=!1,o=wx.createInterstitialAd({adUnitId:e});o.onError(function(e){r=!0}),o.load().then(function(){if(!r)return o.show();n({state:100001,msg:"广告加载后发生错误"})}).then(t).catch(function(e){return n({state:100002,msg:JSON.stringify(e)})}),o.onClose(function(e){console.log("广告关闭:",e.isEnded?"正常播放完成":"用户提前关闭")})})},exports.jf_trace=Un,exports.jf_tracePageView=function(e){return new Promise(function(t,n){_n?(_n.track("VIEW_CONTENT",{item:e}),t()):n({state:100001,msg:"上报失败!广点通 sdk 未初始化"})})};
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "jf-gamekit",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "module": "index.es.js",
6
+ "main": "index.js",
7
+ "types": "index.d.ts",
8
+ "scripts": {
9
+ "test:wx": "rm -rf ./test/wx/wxSdk.js && ln ./es/wxSdk.es.js ./test/wx/wxSdk.js",
10
+ "test:tt": "rm -rf ./test/tt/ttSdk.js && ln ./es/ttSdk.es.js ./test/tt/ttSdk.js",
11
+ "build": "rm -rf lib es && rollup -c",
12
+ "dev": "rm -rf lib es && rollup -cw"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "files": [
18
+ "es",
19
+ "lib",
20
+ "index.d.ts",
21
+ "package.json",
22
+ "index.js",
23
+ "index.es.js"
24
+ ],
25
+ "dependencies": {
26
+ "@dn-sdk/minigame": "^1.5.5",
27
+ "crypto-js": "^4.2.0"
28
+ },
29
+ "devDependencies": {
30
+ "@babel/core": "^7.28.0",
31
+ "@babel/preset-env": "^7.28.0",
32
+ "@rollup/plugin-babel": "^6.0.4",
33
+ "@rollup/plugin-commonjs": "^28.0.6",
34
+ "@rollup/plugin-node-resolve": "^16.0.1",
35
+ "@rollup/plugin-terser": "^0.4.4",
36
+ "deepmerge": "^4.3.1",
37
+ "rollup": "^2.79.2"
38
+ }
39
+ }