lite-pos-wx-plugin-mate 1.0.3

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/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "lite-pos-wx-plugin-mate",
3
+ "version": "1.0.3",
4
+ "description": "",
5
+ "main": "miniprogram_dist/index.js",
6
+ "scripts": {
7
+ "dev": "gulp dev --develop",
8
+ "watch": "gulp watch --develop --watch",
9
+ "build": "gulp",
10
+ "dist": "npm run build",
11
+ "clean-dev": "gulp clean --develop",
12
+ "clean": "gulp clean",
13
+ "test": "jest --bail",
14
+ "test-debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --bail",
15
+ "coverage": "jest ./test/* --coverage --bail",
16
+ "lint": "eslint \"src/**/*.js\" --fix",
17
+ "lint-tools": "eslint \"tools/**/*.js\" --rule \"import/no-extraneous-dependencies: false\" --fix"
18
+ },
19
+ "miniprogram": "miniprogram_dist",
20
+ "jest": {
21
+ "testEnvironment": "jsdom",
22
+ "testURL": "https://jest.test",
23
+ "collectCoverageFrom": [
24
+ "miniprogram_dist/**/*.js"
25
+ ],
26
+ "moduleDirectories": [
27
+ "node_modules",
28
+ "miniprogram_dist"
29
+ ]
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": ""
34
+ },
35
+ "author": "nhy",
36
+ "license": "MIT",
37
+ "devDependencies": {
38
+ "@babel/core": "^7.18.10",
39
+ "@babel/preset-env": "^7.18.10",
40
+ "@typescript-eslint/eslint-plugin": "^2.28.0",
41
+ "@typescript-eslint/parser": "^2.28.0",
42
+ "babel-loader": "^7.1.5",
43
+ "babel-plugin-module-resolver": "^3.2.0",
44
+ "babel-plugin-transform-object-rest-spread": "^6.26.0",
45
+ "babel-preset-env": "^1.7.0",
46
+ "colors": "^1.3.1",
47
+ "eslint": "^5.14.1",
48
+ "eslint-config-airbnb-base": "13.1.0",
49
+ "eslint-loader": "^2.1.2",
50
+ "eslint-plugin-import": "^2.16.0",
51
+ "eslint-plugin-node": "^7.0.1",
52
+ "eslint-plugin-promise": "^3.8.0",
53
+ "gulp": "^4.0.0",
54
+ "gulp-clean": "^0.4.0",
55
+ "gulp-if": "^2.0.2",
56
+ "gulp-install": "^1.1.0",
57
+ "gulp-less": "^4.0.1",
58
+ "gulp-rename": "^1.4.0",
59
+ "gulp-sourcemaps": "^2.6.5",
60
+ "jest": "^23.5.0",
61
+ "miniprogram-api-typings": "^2.10.3-1",
62
+ "miniprogram-simulate": "^1.2.5",
63
+ "thread-loader": "^2.1.3",
64
+ "through2": "^2.0.3",
65
+ "ts-loader": "^7.0.0",
66
+ "typescript": "^3.8.3",
67
+ "uglifyjs-webpack-plugin": "^2.2.0",
68
+ "vinyl": "^2.2.0",
69
+ "webpack": "^4.29.5",
70
+ "webpack-node-externals": "^1.7.2"
71
+ }
72
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "compileType": "miniprogram",
3
+ "setting": {
4
+ "urlCheck": true,
5
+ "coverView": true,
6
+ "es6": true,
7
+ "postcss": true,
8
+ "lazyloadPlaceholderEnable": false,
9
+ "preloadBackgroundData": false,
10
+ "minified": true,
11
+ "autoAudits": false,
12
+ "uglifyFileName": false,
13
+ "uploadWithSourceMap": true,
14
+ "enhance": true,
15
+ "showShadowRootInWxmlPanel": true,
16
+ "packNpmManually": false,
17
+ "packNpmRelationList": [],
18
+ "minifyWXSS": true,
19
+ "useStaticServer": true,
20
+ "showES6CompileOption": false,
21
+ "checkInvalidKey": true,
22
+ "babelSetting": {
23
+ "ignore": [],
24
+ "disablePlugins": [],
25
+ "outputPath": ""
26
+ },
27
+ "disableUseStrict": false,
28
+ "useCompilerPlugins": false,
29
+ "minifyWXML": true,
30
+ "ignoreUploadUnusedFiles": true,
31
+ "localPlugins": false
32
+ },
33
+ "condition": {},
34
+ "editorSetting": {
35
+ "tabIndent": "insertSpaces",
36
+ "tabSize": 2
37
+ },
38
+ "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
39
+ "libVersion": "2.17.0",
40
+ "packOptions": {
41
+ "ignore": [],
42
+ "include": []
43
+ },
44
+ "appid": "wxaeb8e69da76feb0c"
45
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "projectname": "compoment",
3
+ "setting": {
4
+ "compileHotReLoad": true,
5
+ "urlCheck": false
6
+ },
7
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
8
+ }
@@ -0,0 +1,22 @@
1
+ import LitePosDomain from './constants'
2
+
3
+ // 导入依赖
4
+ const request = require('./request')
5
+
6
+ module.exports = {
7
+ // 申请移动支付
8
+ qrcodePay(ENV, orderToken, reqData) {
9
+ const url = LitePosDomain(ENV) + 'order/' + orderToken + '/pay/qrcode'
10
+ return new Promise((resolve, reject) => {
11
+ request.post(url, reqData).then((respData) => {
12
+ if (respData.result_code !== 'SUCCESS') {
13
+ reject(respData.error_message || '申请移动支付失败')
14
+ } else {
15
+ resolve(respData.data)
16
+ }
17
+ }).catch((error) => {
18
+ reject(error || '申请移动支付失败')
19
+ })
20
+ })
21
+ },
22
+ }
@@ -0,0 +1,9 @@
1
+ function LitePosDomain(env) {
2
+ if (env === 'dev') {
3
+ return 'https://vip-apigateway.iwosai.com/api/lpos/cashier/v1/'
4
+ } else {
5
+ return 'https://vapi.shouqianba.com/api/lpos/cashier/v1/'
6
+ }
7
+ }
8
+
9
+ export default LitePosDomain
@@ -0,0 +1,2 @@
1
+ /* eslint-disable */
2
+ "use strict";var t="0123456789abcdefghijklmnopqrstuvwxyz";function e(e){return t.charAt(e)}function r(t,e){return t&e}function n(t,e){return t|e}function i(t,e){return t^e}function s(t,e){return t&~e}function o(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function a(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var h,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function c(t){var e,r,n="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),n+=u.charAt(r>>6)+u.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=u.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=u.charAt(r>>2)+u.charAt((3&r)<<4));(3&n.length)>0;)n+="=";return n}function f(t){var r,n="",i=0,s=0;for(r=0;r<t.length&&"="!=t.charAt(r);++r){var o=u.indexOf(t.charAt(r));o<0||(0==i?(n+=e(o>>2),s=3&o,i=1):1==i?(n+=e(s<<2|o>>4),s=15&o,i=2):2==i?(n+=e(s),n+=e(o>>2),s=3&o,i=3):(n+=e(s<<2|o>>4),n+=e(15&o),i=0))}return 1==i&&(n+=e(s<<2)),n}var l,p=function(t){var e;if(void 0===h){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(h={},e=0;e<16;++e)h[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)h[r.charAt(e)]=e;for(e=0;e<8;++e)h[n.charAt(e)]=-1}var i=[],s=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=h[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);s|=a,++o>=2?(i[i.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return i},d={decode:function(t){var e;if(void 0===l){var r="= \f\n\r\t \u2028\u2029";for(l=Object.create(null),e=0;e<64;++e)l["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(l["-"]=62,l._=63,e=0;e<9;++e)l[r.charAt(e)]=-1}var n=[],i=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=l[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);i|=o,++s>=4?(n[n.length]=i>>16,n[n.length]=i>>8&255,n[n.length]=255&i,i=0,s=0):i<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=i>>10;break;case 3:n[n.length]=i>>16,n[n.length]=i>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=d.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return d.decode(t)}},g=1e13,v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,n,i=this.buf,s=i.length;for(r=0;r<s;++r)(n=i[r]*t+e)<g?e=0:n-=(e=0|n/g)*g,i[r]=n;e>0&&(i[r]=e)},t.prototype.sub=function(t){var e,r,n=this.buf,i=n.length;for(e=0;e<i;++e)(r=n[e]-t)<0?(r+=g,t=1):t=0,n[e]=r;for(;0===n[n.length-1];)n.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),n=e.length-2;n>=0;--n)r+=(g+e[n]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=e*g+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),y=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,m=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function _(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var b,w=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var n="",i=t;i<e;++i)if(n+=this.hexByte(this.get(i)),!0!==r)switch(15&i){case 7:n+=" ";break;case 15:n+="\n";break;default:n+=" "}return n},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var n=this.get(r);if(n<32||n>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",n=t;n<e;++n)r+=String.fromCharCode(this.get(n));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",n=t;n<e;){var i=this.get(n++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(n++)):String.fromCharCode((15&i)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,n,i="",s=t;s<e;)r=this.get(s++),n=this.get(s++),i+=String.fromCharCode(r<<8|n);return i},t.prototype.parseTime=function(t,e,r){var n=this.parseStringISO(t,e),i=(r?y:m).exec(n);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),n=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(n+=":"+i[5],i[6]&&(n+=":"+i[6],i[7]&&(n+="."+i[7]))),i[8]&&(n+=" UTC","Z"!=i[8]&&(n+=i[8],i[9]&&(n+=":"+i[9]))),n):"Unrecognized time: "+n},t.prototype.parseInteger=function(t,e){for(var r,n=this.get(t),i=n>127,s=i?255:0,o="";n==s&&++t<e;)n=this.get(t);if(0===(r=e-t))return i?-1:0;if(r>4){for(o=n,r<<=3;0==(128&(+o^s));)o=+o<<1,--r;o="("+r+" bit)\n"}i&&(n-=256);for(var a=new v(n),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},t.prototype.parseBitString=function(t,e,r){for(var n=this.get(t),i="("+((e-t-1<<3)-n)+" bit)\n",s="",o=t+1;o<e;++o){for(var a=this.get(o),h=o==e-1?n:0,u=7;u>=h;--u)s+=a>>u&1?"1":"0";if(s.length>r)return i+_(s,r)}return i+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return _(this.parseStringISO(t,e),r);var n=e-t,i="("+n+" byte)\n";n>(r/=2)&&(e=t+r);for(var s=t;s<e;++s)i+=this.hexByte(this.get(s));return n>r&&(i+="…"),i},t.prototype.parseOID=function(t,e,r){for(var n="",i=new v,s=0,o=t;o<e;++o){var a=this.get(o);if(i.mulAdd(128,127&a),s+=7,!(128&a)){if(""===n)if((i=i.simplify())instanceof v)i.sub(80),n="2."+i.toString();else{var h=i<80?i<40?0:1:2;n=h+"."+(i-40*h)}else n+="."+i.toString();if(n.length>r)return _(n,r);i=new v,s=0}}return s>0&&(n+=".incomplete"),n},t}(),S=function(){function t(t,e,r,n,i){if(!(n instanceof x))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=n,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return _(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return _(this.stream.parseStringISO(e,e+r),t);case 30:return _(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,n=this.sub.length;r<n;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var n=0;n<r;++n)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substr(e,r)},t.decode=function(e){var r;r=e instanceof w?e:new w(e,0);var n=new w(r),i=new x(r),s=t.decodeLength(r),o=r.pos,a=o-n.pos,h=null,u=function(){var e=[];if(null!==s){for(var n=o+s;r.pos<n;)e[e.length]=t.decode(r);if(r.pos!=n)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var i=t.decode(r);if(i.tag.isEOC())break;e[e.length]=i}s=o-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)h=u();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=u();for(var c=0;c<h.length;++c)if(h[c].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);r.pos=o+Math.abs(s)}return new t(n,a,s,i,h)},t}(),x=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new v;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],E=(1<<26)/T[T.length-1],D=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return this.toRadix(t);r=2}var n,i=(1<<r)-1,s=!1,o="",a=this.t,h=this.DB-a*this.DB%r;if(a-- >0)for(h<this.DB&&(n=this[a]>>h)>0&&(s=!0,o=e(n));a>=0;)h<r?(n=(this[a]&(1<<h)-1)<<r-h,n|=this[--a]>>(h+=this.DB-r)):(n=this[a]>>(h-=r)&i,h<=0&&(h+=this.DB,--a)),n>0&&(s=!0),s&&(o+=e(n));return s?o:"0"},t.prototype.negate=function(){var e=O();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+j(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=O();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new A(e):new I(e),this.exp(t,r)},t.prototype.clone=function(){var t=O();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=O();return this.bitwiseTo(t,r,e),e},t.prototype.or=function(t){var e=O();return this.bitwiseTo(t,n,e),e},t.prototype.xor=function(t){var e=O();return this.bitwiseTo(t,i,e),e},t.prototype.andNot=function(t){var e=O();return this.bitwiseTo(t,s,e),e},t.prototype.not=function(){for(var t=O(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=O();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=O();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+o(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=a(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,n)},t.prototype.clearBit=function(t){return this.changeBit(t,s)},t.prototype.flipBit=function(t){return this.changeBit(t,i)},t.prototype.add=function(t){var e=O();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=O();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=O();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=O();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=O();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=O(),r=O();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,n,i=t.bitLength(),s=M(1);if(i<=0)return s;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new A(e):e.isEven()?new k(e):new I(e);var o=[],a=3,h=r-1,u=(1<<r)-1;if(o[1]=n.convert(this),r>1){var c=O();for(n.sqrTo(o[1],c);a<=u;)o[a]=O(),n.mulTo(c,o[a-2],o[a]),a+=2}var f,l,p=t.t-1,d=!0,g=O();for(i=j(t[p])-1;p>=0;){for(i>=h?f=t[p]>>i-h&u:(f=(t[p]&(1<<i+1)-1)<<h-i,p>0&&(f|=t[p-1]>>this.DB+i-h)),a=r;0==(1&f);)f>>=1,--a;if((i-=a)<0&&(i+=this.DB,--p),d)o[f].copyTo(s),d=!1;else{for(;a>1;)n.sqrTo(s,g),n.sqrTo(g,s),a-=2;a>0?n.sqrTo(s,g):(l=s,s=g,g=l),n.mulTo(g,o[f],s)}for(;p>=0&&0==(t[p]&1<<i);)n.sqrTo(s,g),l=s,s=g,g=l,--i<0&&(i=this.DB-1,--p)}return n.revert(s)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var n=e.clone(),i=this.clone(),s=M(1),o=M(0),a=M(0),h=M(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),r?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);n.compareTo(i)>=0?(n.subTo(i,n),r&&s.subTo(a,s),o.subTo(h,o)):(i.subTo(n,i),r&&a.subTo(s,a),h.subTo(o,h))}return 0!=i.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new B)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(i<s&&(s=i),s>0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=T[T.length-1]){for(e=0;e<T.length;++e)if(r[0]==T[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<T.length;){for(var n=T[e],i=e+1;i<T.length&&n<E;)n*=T[i++];for(n=r.modInt(n);e<i;)if(n%T[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(e,r);n=2}this.t=0,this.s=0;for(var i=e.length,s=!1,o=0;--i>=0;){var a=8==n?255&+e[i]:V(e,i);a<0?"-"==e.charAt(i)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&+e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,n=this.DB-r,i=(1<<n)-1,s=Math.floor(t/this.DB),o=this.s<<r&this.DM,a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>n|o,o=(this[a]&i)<<r;for(a=s-1;a>=0;--a)e[a]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,s=(1<<n)-1;e[0]=this[r]>>n;for(var o=r+1;o<this.t;++o)e[o-r-1]|=(this[o]&s)<<i,e[o-r]=this[o]>>n;n>0&&(e[this.t-r-1]|=(this.s&s)<<i),e.t=this.t-r,e.clamp()}},t.prototype.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var n=this.abs(),i=e.abs(),s=n.t;for(r.t=s+i.t;--s>=0;)r[s]=0;for(s=0;s<i.t;++s)r[s+n.t]=n.am(0,i[s],r,s,0,n.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,n){var i=e.abs();if(!(i.t<=0)){var s=this.abs();if(s.t<i.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=O());var o=O(),a=this.s,h=e.s,u=this.DB-j(i[i.t-1]);u>0?(i.lShiftTo(u,o),s.lShiftTo(u,n)):(i.copyTo(o),s.copyTo(n));var c=o.t,f=o[c-1];if(0!=f){var l=f*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),p=this.FV/l,d=(1<<this.F1)/l,g=1<<this.F2,v=n.t,y=v-c,m=null==r?O():r;for(o.dlShiftTo(y,m),n.compareTo(m)>=0&&(n[n.t++]=1,n.subTo(m,n)),t.ONE.dlShiftTo(c,m),m.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--y>=0;){var _=n[--v]==f?this.DM:Math.floor(n[v]*p+(n[v-1]+g)*d);if((n[v]+=o.am(0,_,n,y,0,c))<_)for(o.dlShiftTo(y,m),n.subTo(m,n);n[v]<--_;)n.subTo(m,n)}null!=r&&(n.drShiftTo(c,r),a!=h&&t.ZERO.subTo(r,r)),n.t=c,n.clamp(),u>0&&n.rShiftTo(u,n),a<0&&t.ZERO.subTo(n,n)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var n=O(),i=O(),s=r.convert(this),o=j(e)-1;for(s.copyTo(n);--o>=0;)if(r.sqrTo(n,i),(e&1<<o)>0)r.mulTo(i,s,n);else{var a=n;n=i,i=a}return r.revert(n)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=M(r),i=O(),s=O(),o="";for(this.divRemTo(n,i,s);i.signum()>0;)o=(r+s.intValue()).toString(t).substr(1)+o,i.divRemTo(n,i,s);return s.intValue().toString(t)+o},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),s=!1,o=0,a=0,h=0;h<e.length;++h){var u=V(e,h);u<0?"-"==e.charAt(h)&&0==this.signum()&&(s=!0):(a=r*a+u,++o>=n&&(this.dMultiply(i),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(r,o)),this.dAddOffset(a,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),n,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var s=[],o=7&e;s.length=1+(e>>3),r.nextBytes(s),o>0?s[0]&=(1<<o)-1:s[0]=0,this.fromString(s,256)}},t.prototype.bitwiseTo=function(t,e,r){var n,i,s=Math.min(t.t,this.t);for(n=0;n<s;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=s;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=s;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var n=t.ONE.shiftLeft(e);return this.bitwiseTo(n,r,n),n},t.prototype.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(var i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,t[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t[n],r,n,0,e-n);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);(e=e+1>>1)>T.length&&(e=T.length);for(var s=O(),o=0;o<e;++o){s.fromInt(T[Math.floor(Math.random()*T.length)]);var a=s.modPow(i,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(r)){for(var h=1;h++<n&&0!=a.compareTo(r);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=O();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var s=r.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)e(r);else{s<o&&(o=s),o>0&&(r.rShiftTo(o,r),n.rShiftTo(o,n));var a=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=n.getLowestSetBit())>0&&n.rShiftTo(s,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),r.signum()>0?setTimeout(a,0):(o>0&&n.lShiftTo(o,n),setTimeout((function(){e(n)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,r,i,s){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),n,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(r)?setTimeout((function(){s()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var h=[],u=7&e;h.length=1+(e>>3),r.nextBytes(h),u>0?h[0]&=(1<<u)-1:h[0]=0,this.fromString(h,256)}},t}(),B=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),A=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=O();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(D.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=O();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),k=function(){function t(t){this.m=t,this.r2=O(),this.q3=O(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=O();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function O(){return new D(null)}function z(t,e){return new D(t,e)}var R="undefined"!=typeof navigator;R&&"Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,r,n,i,s){for(var o=32767&e,a=e>>15;--s>=0;){var h=32767&this[t],u=this[t++]>>15,c=a*h+u*o;i=((h=o*h+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+a*u+(i>>>30),r[n++]=1073741823&h}return i},b=30):R&&"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,r,n,i,s){for(;--s>=0;){var o=e*this[t++]+r[n]+i;i=Math.floor(o/67108864),r[n++]=67108863&o}return i},b=26):(D.prototype.am=function(t,e,r,n,i,s){for(var o=16383&e,a=e>>14;--s>=0;){var h=16383&this[t],u=this[t++]>>14,c=a*h+u*o;i=((h=o*h+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+a*u,r[n++]=268435455&h}return i},b=28),D.prototype.DB=b,D.prototype.DM=(1<<b)-1,D.prototype.DV=1<<b;D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-b,D.prototype.F2=2*b-52;var C,P,N=[];for(C="0".charCodeAt(0),P=0;P<=9;++P)N[C++]=P;for(C="a".charCodeAt(0),P=10;P<36;++P)N[C++]=P;for(C="A".charCodeAt(0),P=10;P<36;++P)N[C++]=P;function V(t,e){var r=N[t.charCodeAt(e)];return null==r?-1:r}function M(t){var e=O();return e.fromInt(t),e}function j(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}D.ZERO=M(0),D.ONE=M(1);var H=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var q,L,F=null;function U(){if(null==q){for(q=new H;L<256;){var t=Math.floor(65536*Math.random());F[L++]=255&t}for(q.init(F),L=0;L<F.length;++L)F[L]=0;L=0}return q.next()}null==F&&(F=[],L=0);var K=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=U()},t}();var Z=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=z(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,r=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=t.length-1;n>=0&&e>0;){var i=t.charCodeAt(n--);i<128?r[--e]=i:i>127&&i<2048?(r[--e]=63&i|128,r[--e]=i>>6|192):(r[--e]=63&i|128,r[--e]=i>>6&63|128,r[--e]=i>>12|224)}r[--e]=0;for(var s=new K,o=[];e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);r[--e]=o[0]}return r[--e]=2,r[--e]=0,new D(r)}(t,e);if(null==r)return null;var n=this.doPublic(r);if(null==n)return null;for(var i=n.toString(16),s=i.length,o=0;o<2*e-s;o++)i="0"+i;return i},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=z(t,16),this.e=parseInt(e,16),this.d=z(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,n,i,s,o,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=z(t,16),this.e=parseInt(e,16),this.d=z(r,16),this.p=z(n,16),this.q=z(i,16),this.dmp1=z(s,16),this.dmq1=z(o,16),this.coeff=z(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new K,n=t>>1;this.e=parseInt(e,16);for(var i=new D(e,16);;){for(;this.p=new D(t-n,1,r),0!=this.p.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(n,1,r),0!=this.q.subtract(D.ONE).gcd(i).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(D.ONE),a=this.q.subtract(D.ONE),h=o.multiply(a);if(0==h.gcd(i).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=z(t,16),r=this.doPrivate(e);return null==r?null:function(t,e){var r=t.toByteArray(),n=0;for(;n<r.length&&0==r[n];)++n;if(r.length-n!=e-1||2!=r[n])return null;++n;for(;0!=r[n];)if(++n>=r.length)return null;var i="";for(;++n<r.length;){var s=255&r[n];s<128?i+=String.fromCharCode(s):s>191&&s<224?(i+=String.fromCharCode((31&s)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&s)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var n=new K,i=t>>1;this.e=parseInt(e,16);var s=new D(e,16),o=this,a=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(D.ONE),n=o.q.subtract(D.ONE),i=e.multiply(n);0==i.gcd(s).compareTo(D.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(i),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(n),o.coeff=o.q.modInverse(o.p),setTimeout((function(){r()}),0)):setTimeout(a,0)},h=function(){o.q=O(),o.q.fromNumberAsync(i,1,n,(function(){o.q.subtract(D.ONE).gcda(s,(function(t){0==t.compareTo(D.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)}))}))},u=function(){o.p=O(),o.p.fromNumberAsync(t-i,1,n,(function(){o.p.subtract(D.ONE).gcda(s,(function(t){0==t.compareTo(D.ONE)&&o.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,r){var n=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,n="",i=0;i<r;i+=2)n+="ff";return z("0001"+n+"00"+t,16)}((W[r]||"")+e(t).toString(),this.n.bitLength()/4);if(null==n)return null;var i=this.doPrivate(n);if(null==i)return null;var s=i.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,r){var n=z(e,16),i=this.doPublic(n);return null==i?null:function(t){for(var e in W)if(W.hasOwnProperty(e)){var r=W[e],n=r.length;if(t.substr(0,n)==r)return t.substr(n)}return t}(i.toString(16).replace(/^1f+00/,""))==r(t).toString()},t.prototype.encryptLong=function(t){var e=this,r="",n=(this.n.bitLength()+7>>3)-11;return this.setSplitChn(t,n).forEach((function(t){r+=e.encrypt(t)})),r},t.prototype.decryptLong=function(t){var e="",r=this.n.bitLength()+7>>3,n=2*r;if(t.length>n){for(var i=t.match(new RegExp(".{1,"+n+"}","g"))||[],s=[],o=0;o<i.length;o++){var a=z(i[o],16),h=this.doPrivate(a);if(null==h)return null;s.push(h)}e=function(t,e){for(var r=[],n=0;n<t.length;n++){for(var i=t[n].toByteArray(),s=0;s<i.length&&0==i[s];)++s;if(i.length-s!=e-1||2!=i[s])return null;for(++s;0!=i[s];)if(++s>=i.length)return null;r=r.concat(i.slice(s+1))}var o=r,a=-1,h="";for(;++a<o.length;){var u=255&o[a];u<128?h+=String.fromCharCode(u):u>191&&u<224?(h+=String.fromCharCode((31&u)<<6|63&o[a+1]),++a):(h+=String.fromCharCode((15&u)<<12|(63&o[a+1])<<6|63&o[a+2]),a+=2)}return h}(s,r)}else e=this.decrypt(t);return e},t.prototype.setSplitChn=function(t,e,r){void 0===r&&(r=[]);for(var n=t.split(""),i=0,s=0;s<n.length;s++){var o=n[s].charCodeAt(0);if((i+=o<=127?1:o<=2047?2:o<=65535?3:4)>e){var a=t.substring(0,s);return r.push(a),this.setSplitChn(t.substring(s),e,r)}}return r.push(t),r},t}();var W={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var G={};G.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var n=function(){};if(n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),r){var i;for(i in r)t.prototype[i]=r[i];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(t,e){for(i=0;i<o.length;i+=1){var r=o[i],n=e[r];"function"==typeof n&&n!=Object.prototype[r]&&(t[r]=n)}})}catch(t){}s(t.prototype,r)}}};var J={};void 0!==J.asn1&&J.asn1||(J.asn1={}),J.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substr(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";e=new D(n,16).xor(t).add(D.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=J.asn1,r=e.DERBoolean,n=e.DERInteger,i=e.DERBitString,s=e.DEROctetString,o=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,u=e.DERUTF8String,c=e.DERNumericString,f=e.DERPrintableString,l=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,g=e.DERGeneralizedTime,v=e.DERSequence,y=e.DERSet,m=e.DERTaggedObject,_=e.ASN1Util.newObject,b=Object.keys(t);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(t[w]);if("int"==w)return new n(t[w]);if("bitstr"==w)return new i(t[w]);if("octstr"==w)return new s(t[w]);if("null"==w)return new o(t[w]);if("oid"==w)return new a(t[w]);if("enum"==w)return new h(t[w]);if("utf8str"==w)return new u(t[w]);if("numstr"==w)return new c(t[w]);if("prnstr"==w)return new f(t[w]);if("telstr"==w)return new l(t[w]);if("ia5str"==w)return new p(t[w]);if("utctime"==w)return new d(t[w]);if("gentime"==w)return new g(t[w]);if("seq"==w){for(var S=t[w],x=[],T=0;T<S.length;T++){var E=_(S[T]);x.push(E)}return new v({array:x})}if("set"==w){for(S=t[w],x=[],T=0;T<S.length;T++){E=_(S[T]);x.push(E)}return new y({array:x})}if("tag"==w){var D=t[w];if("[object Array]"===Object.prototype.toString.call(D)&&3==D.length){var B=_(D[2]);return new m({tag:D[0],explicit:D[1],obj:B})}var A={};if(void 0!==D.explicit&&(A.explicit=D.explicit),void 0!==D.tag&&(A.tag=D.tag),void 0===D.obj)throw"obj shall be specified for 'tag'.";return A.obj=_(D.obj),new m(A)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},J.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substr(0,2),16),n=(e=Math.floor(r/40)+"."+r%40,""),i=2;i<t.length;i+=2){var s=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);if(n+=s.substr(1,7),"0"==s.substr(0,1))e=e+"."+new D(n,2).toString(10),n=""}return e},J.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",n=new D(t,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var s="",o=0;o<i;o++)s+="0";n=s+n;for(o=0;o<n.length-1;o+=7){var a=n.substr(o,7);o!=n.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),s=40*parseInt(i[0])+parseInt(i[1]);n+=e(s),i.splice(0,2);for(var o=0;o<i.length;o++)n+=r(i[o]);return n},J.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},J.asn1.DERAbstractString=function(t){J.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},G.lang.extend(J.asn1.DERAbstractString,J.asn1.ASN1Object),J.asn1.DERAbstractTime=function(t){J.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var n=this.zeroPadding,i=this.localDateToUTC(t),s=String(i.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=s+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var a=i.getMilliseconds();if(0!=a){var h=n(String(a),3);o=o+"."+(h=h.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,n,i,s){var o=new Date(Date.UTC(t,e-1,r,n,i,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},G.lang.extend(J.asn1.DERAbstractTime,J.asn1.ASN1Object),J.asn1.DERAbstractStructured=function(t){J.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},G.lang.extend(J.asn1.DERAbstractStructured,J.asn1.ASN1Object),J.asn1.DERBoolean=function(){J.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},G.lang.extend(J.asn1.DERBoolean,J.asn1.ASN1Object),J.asn1.DERInteger=function(t){J.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=J.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},G.lang.extend(J.asn1.DERInteger,J.asn1.ASN1Object),J.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=J.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}J.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";var n="";for(r=0;r<t.length-1;r+=8){var i=t.substr(r,8),s=parseInt(i,2).toString(16);1==s.length&&(s="0"+s),n+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+n},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},G.lang.extend(J.asn1.DERBitString,J.asn1.ASN1Object),J.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=J.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}J.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},G.lang.extend(J.asn1.DEROctetString,J.asn1.DERAbstractString),J.asn1.DERNull=function(){J.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},G.lang.extend(J.asn1.DERNull,J.asn1.ASN1Object),J.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",n=new D(t,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var s="",o=0;o<i;o++)s+="0";n=s+n;for(o=0;o<n.length-1;o+=7){var a=n.substr(o,7);o!=n.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};J.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),s=40*parseInt(i[0])+parseInt(i[1]);n+=e(s),i.splice(0,2);for(var o=0;o<i.length;o++)n+=r(i[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(t){var e=J.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},G.lang.extend(J.asn1.DERObjectIdentifier,J.asn1.ASN1Object),J.asn1.DEREnumerated=function(t){J.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=J.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},G.lang.extend(J.asn1.DEREnumerated,J.asn1.ASN1Object),J.asn1.DERUTF8String=function(t){J.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},G.lang.extend(J.asn1.DERUTF8String,J.asn1.DERAbstractString),J.asn1.DERNumericString=function(t){J.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},G.lang.extend(J.asn1.DERNumericString,J.asn1.DERAbstractString),J.asn1.DERPrintableString=function(t){J.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},G.lang.extend(J.asn1.DERPrintableString,J.asn1.DERAbstractString),J.asn1.DERTeletexString=function(t){J.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},G.lang.extend(J.asn1.DERTeletexString,J.asn1.DERAbstractString),J.asn1.DERIA5String=function(t){J.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},G.lang.extend(J.asn1.DERIA5String,J.asn1.DERAbstractString),J.asn1.DERUTCTime=function(t){J.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},G.lang.extend(J.asn1.DERUTCTime,J.asn1.DERAbstractTime),J.asn1.DERGeneralizedTime=function(t){J.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},G.lang.extend(J.asn1.DERGeneralizedTime,J.asn1.DERAbstractTime),J.asn1.DERSequence=function(t){J.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},G.lang.extend(J.asn1.DERSequence,J.asn1.DERAbstractStructured),J.asn1.DERSet=function(t){J.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},G.lang.extend(J.asn1.DERSet,J.asn1.DERAbstractStructured),J.asn1.DERTaggedObject=function(t){J.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},G.lang.extend(J.asn1.DERTaggedObject,J.asn1.ASN1Object);var X,Y=(X=function(t,e){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},X(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Q=function(t){function e(r){var n=t.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return Y(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?p(t):d.unarmor(t),i=S.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=z(e,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var s=i.sub[3].getHexStringValue();this.d=z(s,16);var o=i.sub[4].getHexStringValue();this.p=z(o,16);var a=i.sub[5].getHexStringValue();this.q=z(a,16);var h=i.sub[6].getHexStringValue();this.dmp1=z(h,16);var u=i.sub[7].getHexStringValue();this.dmq1=z(u,16);var c=i.sub[8].getHexStringValue();this.coeff=z(c,16)}else{if(2!==i.sub.length)return!1;var f=i.sub[1].sub[0];e=f.sub[0].getHexStringValue(),this.n=z(e,16),r=f.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new J.asn1.DERInteger({int:0}),new J.asn1.DERInteger({bigint:this.n}),new J.asn1.DERInteger({int:this.e}),new J.asn1.DERInteger({bigint:this.d}),new J.asn1.DERInteger({bigint:this.p}),new J.asn1.DERInteger({bigint:this.q}),new J.asn1.DERInteger({bigint:this.dmp1}),new J.asn1.DERInteger({bigint:this.dmq1}),new J.asn1.DERInteger({bigint:this.coeff})]};return new J.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return c(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new J.asn1.DERSequence({array:[new J.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new J.asn1.DERNull]}),e=new J.asn1.DERSequence({array:[new J.asn1.DERInteger({bigint:this.n}),new J.asn1.DERInteger({int:this.e})]}),r=new J.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new J.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return c(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(Z),tt="3.2.1",et=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Q(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(f(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return c(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.encryptLong=function(t){try{return c(this.getKey().encryptLong(t))}catch(t){return!1}},t.prototype.decryptLong=function(t){try{return this.getKey().decryptLong(f(t))}catch(t){return!1}},t.prototype.sign=function(t,e,r){try{return c(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.verify=function(t,e,r){try{return this.getKey().verify(t,f(e),r)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new Q,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=tt,t}();function rt(t,e){let r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function nt(t,e,r,n,i,s){return rt((o=rt(rt(e,t),rt(n,s)))<<(a=i)|o>>>32-a,r);var o,a}function it(t,e,r,n,i,s,o){return nt(e&r|~e&n,t,e,i,s,o)}function st(t,e,r,n,i,s,o){return nt(e&n|r&~n,t,e,i,s,o)}function ot(t,e,r,n,i,s,o){return nt(e^r^n,t,e,i,s,o)}function at(t,e,r,n,i,s,o){return nt(r^(e|~n),t,e,i,s,o)}function ht(t,e){let r,n,i,s,o;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let a=1732584193,h=-271733879,u=-1732584194,c=271733878;for(r=0;r<t.length;r+=16)n=a,i=h,s=u,o=c,a=it(a,h,u,c,t[r],7,-680876936),c=it(c,a,h,u,t[r+1],12,-389564586),u=it(u,c,a,h,t[r+2],17,606105819),h=it(h,u,c,a,t[r+3],22,-1044525330),a=it(a,h,u,c,t[r+4],7,-176418897),c=it(c,a,h,u,t[r+5],12,1200080426),u=it(u,c,a,h,t[r+6],17,-1473231341),h=it(h,u,c,a,t[r+7],22,-45705983),a=it(a,h,u,c,t[r+8],7,1770035416),c=it(c,a,h,u,t[r+9],12,-1958414417),u=it(u,c,a,h,t[r+10],17,-42063),h=it(h,u,c,a,t[r+11],22,-1990404162),a=it(a,h,u,c,t[r+12],7,1804603682),c=it(c,a,h,u,t[r+13],12,-40341101),u=it(u,c,a,h,t[r+14],17,-1502002290),h=it(h,u,c,a,t[r+15],22,1236535329),a=st(a,h,u,c,t[r+1],5,-165796510),c=st(c,a,h,u,t[r+6],9,-1069501632),u=st(u,c,a,h,t[r+11],14,643717713),h=st(h,u,c,a,t[r],20,-373897302),a=st(a,h,u,c,t[r+5],5,-701558691),c=st(c,a,h,u,t[r+10],9,38016083),u=st(u,c,a,h,t[r+15],14,-660478335),h=st(h,u,c,a,t[r+4],20,-405537848),a=st(a,h,u,c,t[r+9],5,568446438),c=st(c,a,h,u,t[r+14],9,-1019803690),u=st(u,c,a,h,t[r+3],14,-187363961),h=st(h,u,c,a,t[r+8],20,1163531501),a=st(a,h,u,c,t[r+13],5,-1444681467),c=st(c,a,h,u,t[r+2],9,-51403784),u=st(u,c,a,h,t[r+7],14,1735328473),h=st(h,u,c,a,t[r+12],20,-1926607734),a=ot(a,h,u,c,t[r+5],4,-378558),c=ot(c,a,h,u,t[r+8],11,-2022574463),u=ot(u,c,a,h,t[r+11],16,1839030562),h=ot(h,u,c,a,t[r+14],23,-35309556),a=ot(a,h,u,c,t[r+1],4,-1530992060),c=ot(c,a,h,u,t[r+4],11,1272893353),u=ot(u,c,a,h,t[r+7],16,-155497632),h=ot(h,u,c,a,t[r+10],23,-1094730640),a=ot(a,h,u,c,t[r+13],4,681279174),c=ot(c,a,h,u,t[r],11,-358537222),u=ot(u,c,a,h,t[r+3],16,-722521979),h=ot(h,u,c,a,t[r+6],23,76029189),a=ot(a,h,u,c,t[r+9],4,-640364487),c=ot(c,a,h,u,t[r+12],11,-421815835),u=ot(u,c,a,h,t[r+15],16,530742520),h=ot(h,u,c,a,t[r+2],23,-995338651),a=at(a,h,u,c,t[r],6,-198630844),c=at(c,a,h,u,t[r+7],10,1126891415),u=at(u,c,a,h,t[r+14],15,-1416354905),h=at(h,u,c,a,t[r+5],21,-57434055),a=at(a,h,u,c,t[r+12],6,1700485571),c=at(c,a,h,u,t[r+3],10,-1894986606),u=at(u,c,a,h,t[r+10],15,-1051523),h=at(h,u,c,a,t[r+1],21,-2054922799),a=at(a,h,u,c,t[r+8],6,1873313359),c=at(c,a,h,u,t[r+15],10,-30611744),u=at(u,c,a,h,t[r+6],15,-1560198380),h=at(h,u,c,a,t[r+13],21,1309151649),a=at(a,h,u,c,t[r+4],6,-145523070),c=at(c,a,h,u,t[r+11],10,-1120210379),u=at(u,c,a,h,t[r+2],15,718787259),h=at(h,u,c,a,t[r+9],21,-343485551),a=rt(a,n),h=rt(h,i),u=rt(u,s),c=rt(c,o);return[a,h,u,c]}function ut(t){let e,r="",n=32*t.length;for(e=0;e<n;e+=8)r+=String.fromCharCode(t[e>>5]>>>e%32&255);return r}function ct(t){let e,r=[];for(r[(t.length>>2)-1]=void 0,e=0;e<r.length;e+=1)r[e]=0;let n=8*t.length;for(e=0;e<n;e+=8)r[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return r}function ft(t){let e,r,n="0123456789abcdef",i="";for(r=0;r<t.length;r+=1)e=t.charCodeAt(r),i+=n.charAt(e>>>4&15)+n.charAt(15&e);return i}function lt(t){return unescape(encodeURIComponent(t))}function pt(t){return function(t){return ut(ht(ct(t),8*t.length))}(lt(t))}function dt(t,e){return function(t,e){let r,n,i=ct(t),s=[],o=[];for(s[15]=o[15]=void 0,i.length>16&&(i=ht(i,8*t.length)),r=0;r<16;r+=1)s[r]=909522486^i[r],o[r]=1549556828^i[r];return n=ht(s.concat(ct(e)),512+8*e.length),ut(ht(o.concat(n),640))}(lt(t),lt(e))}function gt(t,e,r){return e?r?dt(e,t):ft(dt(e,t)):r?pt(t):ft(pt(t))}var vt,yt,mt=mt||function(t,e){var r={},n=r.lib={},i=function(){},s=n.Base={extend:function(t){i.prototype=this;var e=new i;return t&&e.mixIn(t),e.hasOwnProperty("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)}},o=n.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes;if(t=t.sigBytes,this.clamp(),n%4)for(var i=0;i<t;i++)e[n+i>>>2]|=(r[i>>>2]>>>24-i%4*8&255)<<24-(n+i)%4*8;else if(65535<r.length)for(i=0;i<t;i+=4)e[n+i>>>2]=r[i>>>2];else e.push.apply(e,r);return this.sigBytes+=t,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=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r=[],n=0;n<e;n+=4)r.push(4294967296*t.random()|0);return new o.init(r,e)}}),a=r.enc={},h=a.Hex={stringify:function(t){var e=t.words;t=t.sigBytes;for(var r=[],n=0;n<t;n++){var i=e[n>>>2]>>>24-n%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.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 o.init(r,e/2)}},u=a.Latin1={stringify:function(t){var e=t.words;t=t.sigBytes;for(var r=[],n=0;n<t;n++)r.push(String.fromCharCode(e[n>>>2]>>>24-n%4*8&255));return r.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 o.init(r,e)}},c=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,a=i/(4*s);if(e=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,i=t.min(4*e,i),e){for(var h=0;h<e;h+=s)this._doProcessBlock(n,h);h=n.splice(0,e),r.sigBytes-=i}return new o.init(h,i)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});n.Hasher=f.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.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 l.HMAC.init(t,r).finalize(e)}}});var l=r.algo={};return r}(Math);yt=(vt=mt).lib.WordArray,vt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp(),t=[];for(var 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,o=0;4>o&&i+.75*o<r;o++)t.push(n.charAt(s>>>6*(3-o)&63));if(e=n.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var e=t.length,r=this._map;(n=r.charAt(64))&&-1!=(n=t.indexOf(n))&&(e=n);for(var n=[],i=0,s=0;s<e;s++)if(s%4){var o=r.indexOf(t.charAt(s-1))<<s%4*2,a=r.indexOf(t.charAt(s))>>>6-s%4*2;n[i>>>2]|=(o|a)<<24-i%4*8,i++}return yt.create(n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){function e(t,e,r,n,i,s,o){return((t=t+(e&r|~e&n)+i+o)<<s|t>>>32-s)+e}function r(t,e,r,n,i,s,o){return((t=t+(e&n|r&~n)+i+o)<<s|t>>>32-s)+e}function n(t,e,r,n,i,s,o){return((t=t+(e^r^n)+i+o)<<s|t>>>32-s)+e}function i(t,e,r,n,i,s,o){return((t=t+(r^(e|~n))+i+o)<<s|t>>>32-s)+e}for(var s=mt,o=(h=s.lib).WordArray,a=h.Hasher,h=s.algo,u=[],c=0;64>c;c++)u[c]=4294967296*t.abs(t.sin(c+1))|0;h=h.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,s){for(var o=0;16>o;o++){var a=t[h=s+o];t[h]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}o=this._hash.words;var h=t[s+0],c=(a=t[s+1],t[s+2]),f=t[s+3],l=t[s+4],p=t[s+5],d=t[s+6],g=t[s+7],v=t[s+8],y=t[s+9],m=t[s+10],_=t[s+11],b=t[s+12],w=t[s+13],S=t[s+14],x=t[s+15],T=e(T=o[0],B=o[1],D=o[2],E=o[3],h,7,u[0]),E=e(E,T,B,D,a,12,u[1]),D=e(D,E,T,B,c,17,u[2]),B=e(B,D,E,T,f,22,u[3]);T=e(T,B,D,E,l,7,u[4]),E=e(E,T,B,D,p,12,u[5]),D=e(D,E,T,B,d,17,u[6]),B=e(B,D,E,T,g,22,u[7]),T=e(T,B,D,E,v,7,u[8]),E=e(E,T,B,D,y,12,u[9]),D=e(D,E,T,B,m,17,u[10]),B=e(B,D,E,T,_,22,u[11]),T=e(T,B,D,E,b,7,u[12]),E=e(E,T,B,D,w,12,u[13]),D=e(D,E,T,B,S,17,u[14]),T=r(T,B=e(B,D,E,T,x,22,u[15]),D,E,a,5,u[16]),E=r(E,T,B,D,d,9,u[17]),D=r(D,E,T,B,_,14,u[18]),B=r(B,D,E,T,h,20,u[19]),T=r(T,B,D,E,p,5,u[20]),E=r(E,T,B,D,m,9,u[21]),D=r(D,E,T,B,x,14,u[22]),B=r(B,D,E,T,l,20,u[23]),T=r(T,B,D,E,y,5,u[24]),E=r(E,T,B,D,S,9,u[25]),D=r(D,E,T,B,f,14,u[26]),B=r(B,D,E,T,v,20,u[27]),T=r(T,B,D,E,w,5,u[28]),E=r(E,T,B,D,c,9,u[29]),D=r(D,E,T,B,g,14,u[30]),T=n(T,B=r(B,D,E,T,b,20,u[31]),D,E,p,4,u[32]),E=n(E,T,B,D,v,11,u[33]),D=n(D,E,T,B,_,16,u[34]),B=n(B,D,E,T,S,23,u[35]),T=n(T,B,D,E,a,4,u[36]),E=n(E,T,B,D,l,11,u[37]),D=n(D,E,T,B,g,16,u[38]),B=n(B,D,E,T,m,23,u[39]),T=n(T,B,D,E,w,4,u[40]),E=n(E,T,B,D,h,11,u[41]),D=n(D,E,T,B,f,16,u[42]),B=n(B,D,E,T,d,23,u[43]),T=n(T,B,D,E,y,4,u[44]),E=n(E,T,B,D,b,11,u[45]),D=n(D,E,T,B,x,16,u[46]),T=i(T,B=n(B,D,E,T,c,23,u[47]),D,E,h,6,u[48]),E=i(E,T,B,D,g,10,u[49]),D=i(D,E,T,B,S,15,u[50]),B=i(B,D,E,T,p,21,u[51]),T=i(T,B,D,E,b,6,u[52]),E=i(E,T,B,D,f,10,u[53]),D=i(D,E,T,B,m,15,u[54]),B=i(B,D,E,T,a,21,u[55]),T=i(T,B,D,E,v,6,u[56]),E=i(E,T,B,D,x,10,u[57]),D=i(D,E,T,B,d,15,u[58]),B=i(B,D,E,T,w,21,u[59]),T=i(T,B,D,E,l,6,u[60]),E=i(E,T,B,D,_,10,u[61]),D=i(D,E,T,B,c,15,u[62]),B=i(B,D,E,T,y,21,u[63]);o[0]=o[0]+T|0,o[1]=o[1]+B|0,o[2]=o[2]+D|0,o[3]=o[3]+E|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var s=t.floor(n/4294967296);for(r[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(r.length+1),this._process(),r=(e=this._hash).words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),s.MD5=a._createHelper(h),s.HmacMD5=a._createHmacHelper(h)}(Math),function(){var t,e=mt,r=(t=e.lib).Base,n=t.WordArray,i=(t=e.algo).EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=(a=this.cfg).hasher.create(),i=n.create(),s=i.words,o=a.keySize,a=a.iterations;s.length<o;){h&&r.update(h);var h=r.update(t).finalize(e);r.reset();for(var u=1;u<a;u++)h=r.finalize(h),r.reset();i.concat(h)}return i.sigBytes=4*o,i}});e.EvpKDF=function(t,e,r){return i.create(r).compute(t,e)}}(),mt.lib.Cipher||function(t){var e=(p=mt).lib,r=e.Base,n=e.WordArray,i=e.BufferedBlockAlgorithm,s=p.enc.Base64,o=p.algo.EvpKDF,a=e.Cipher=i.extend({cfg:r.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(){i.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(t){return{encrypt:function(e,r,n){return("string"==typeof r?d:l).encrypt(t,e,r,n)},decrypt:function(e,r,n){return("string"==typeof r?d:l).decrypt(t,e,r,n)}}}});e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=p.mode={},u=function(t,e,r){var n=this._iv;n?this._iv=undefined:n=this._prevBlock;for(var i=0;i<r;i++)t[e+i]^=n[i]},c=(e.BlockCipherMode=r.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}})).extend();c.Encryptor=c.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize;u.call(this,t,e,n),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),c.Decryptor=c.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,i=t.slice(e,e+n);r.decryptBlock(t,e),u.call(this,t,e,n),this._prevBlock=i}}),h=h.CBC=c,c=(p.pad={}).Pkcs7={pad:function(t,e){for(var r,i=(r=(r=4*e)-t.sigBytes%r)<<24|r<<16|r<<8|r,s=[],o=0;o<r;o+=4)s.push(i);r=n.create(s,r),t.concat(r)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:h,padding:c}),reset:function(){a.reset.call(this);var t=(e=this.cfg).iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=e.createEncryptor;else r=e.createDecryptor,this._minBufferSize=1;this._mode=r.call(e,this,t&&t.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var f=e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),l=(h=(p.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?n.create([1398893684,1701076831]).concat(t).concat(e):e).toString(s)},parse:function(t){var e=(t=s.parse(t)).words;if(1398893684==e[0]&&1701076831==e[1]){var r=n.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return f.create({ciphertext:t,salt:r})}},e.SerializableCipher=r.extend({cfg:r.extend({format:h}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n);return e=i.finalize(e),i=i.cfg,f.create({ciphertext:e,key:r,iv:i.iv,algorithm:t,mode:i.mode,padding:i.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}})),p=(p.kdf={}).OpenSSL={execute:function(t,e,r,i){return i||(i=n.random(8)),t=o.create({keySize:e+r}).compute(t,i),r=n.create(t.words.slice(e),4*r),t.sigBytes=4*e,f.create({key:t,iv:r,salt:i})}},d=e.PasswordBasedCipher=l.extend({cfg:l.cfg.extend({kdf:p}),encrypt:function(t,e,r,n){return r=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize),n.iv=r.iv,(t=l.encrypt.call(this,t,e,r.key,n)).mixIn(r),t},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),r=n.kdf.execute(r,t.keySize,t.ivSize,e.salt),n.iv=r.iv,l.decrypt.call(this,t,e,r.key,n)}})}(),function(){for(var t=mt,e=t.lib.BlockCipher,r=t.algo,n=[],i=[],s=[],o=[],a=[],h=[],u=[],c=[],f=[],l=[],p=[],d=0;256>d;d++)p[d]=128>d?d<<1:d<<1^283;var g=0,v=0;for(d=0;256>d;d++){var y=(y=v^v<<1^v<<2^v<<3^v<<4)>>>8^255&y^99;n[g]=y,i[y]=g;var m=p[g],_=p[m],b=p[_],w=257*p[y]^16843008*y;s[g]=w<<24|w>>>8,o[g]=w<<16|w>>>16,a[g]=w<<8|w>>>24,h[g]=w,w=16843009*b^65537*_^257*m^16843008*g,u[y]=w<<24|w>>>8,c[y]=w<<16|w>>>16,f[y]=w<<8|w>>>24,l[y]=w,g?(g=m^p[p[p[b^m]]],v^=p[p[v]]):g=v=1}var S=[0,1,2,4,8,16,32,64,128,27,54];r=r.AES=e.extend({_doReset:function(){for(var t=(r=this._key).words,e=r.sigBytes/4,r=4*((this._nRounds=e+6)+1),i=this._keySchedule=[],s=0;s<r;s++)if(s<e)i[s]=t[s];else{var o=i[s-1];s%e?6<e&&4==s%e&&(o=n[o>>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o]):(o=n[(o=o<<8|o>>>24)>>>24]<<24|n[o>>>16&255]<<16|n[o>>>8&255]<<8|n[255&o],o^=S[s/e|0]<<24),i[s]=i[s-e]^o}for(t=this._invKeySchedule=[],e=0;e<r;e++)s=r-e,o=e%4?i[s]:i[s-4],t[e]=4>e||4>=s?o:u[n[o>>>24]]^c[n[o>>>16&255]]^f[n[o>>>8&255]]^l[n[255&o]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,o,a,h,n)},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,u,c,f,l,i),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,s,o,a){for(var h=this._nRounds,u=t[e]^r[0],c=t[e+1]^r[1],f=t[e+2]^r[2],l=t[e+3]^r[3],p=4,d=1;d<h;d++){var g=n[u>>>24]^i[c>>>16&255]^s[f>>>8&255]^o[255&l]^r[p++],v=n[c>>>24]^i[f>>>16&255]^s[l>>>8&255]^o[255&u]^r[p++],y=n[f>>>24]^i[l>>>16&255]^s[u>>>8&255]^o[255&c]^r[p++];l=n[l>>>24]^i[u>>>16&255]^s[c>>>8&255]^o[255&f]^r[p++],u=g,c=v,f=y}g=(a[u>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^r[p++],v=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[p++],y=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&c])^r[p++],l=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^r[p++],t[e]=g,t[e+1]=v,t[e+2]=y,t[e+3]=l},keySize:8});t.AES=e._createHelper(r)}();const _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function bt(t){this.message=t}function wt(t){let e=String(t);for(var r,n,i=0,s=_t,o="";e.charAt(0|i)||(s="=",i%1);o+=s.charAt(63&r>>8-i%1*8)){if((n=e.charCodeAt(i+=3/4))>255)throw new bt("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|n}return o}bt.prototype=new Error,bt.prototype.name="InvalidCharacterError";var St="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tt={exports:{}};Tt.exports=function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){if(!a&&xt)return xt(o);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var s=xt,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e,r,n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)e=i,r=s,Object.prototype.hasOwnProperty.call(e,r)&&(t[s]=i[s])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var s=0;s<n;s++)t[i+s]=e[r+s]},flattenChunks:function(t){var e,r,n,i,s,o;for(e=n=0,r=t.length;e<r;e++)n+=t[e].length;for(o=new Uint8Array(n),e=i=0,r=t.length;e<r;e++)s=t[e],o.set(s,i),i+=s.length;return o}},s={arraySet:function(t,e,r,n,i){for(var s=0;s<n;s++)t[i+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],2:[function(t,e,r){var n=t("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function h(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",o=0;o<e;o++)r+=String.fromCharCode(t[o]);return r}o[254]=o[254]=1,r.string2buf=function(t){var e,r,i,s,o,a=t.length,h=0;for(s=0;s<a;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(h),s=o=0;o<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?e[o++]=r:(r<2048?e[o++]=192|r>>>6:(r<65536?e[o++]=224|r>>>12:(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63),e[o++]=128|r>>>6&63),e[o++]=128|63&r);return e},r.buf2binstring=function(t){return h(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,n,i,s,a=e||t.length,u=new Array(2*a);for(r=n=0;r<a;)if((i=t[r++])<128)u[n++]=i;else if(4<(s=o[i]))u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&t[r++],s--;1<s?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return h(u,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},{"./common":1}],3:[function(t,e,r){e.exports=function(t,e,r,n){for(var i=65535&t|0,s=t>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3<r?2e3:r;s=s+(i=i+e[n++]|0)|0,--o;);i%=65521,s%=65521}return i|s<<16|0}},{}],4:[function(t,e,r){var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var s=n,o=i+r;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^e[a])];return-1^t}},{}],5:[function(t,e,r){var n,i=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),h=t("./messages"),u=0,c=4,f=0,l=-2,p=-1,d=4,g=2,v=8,y=9,m=286,_=30,b=19,w=2*m+1,S=15,x=3,T=258,E=T+x+1,D=42,B=113,A=1,I=2,k=3,O=4;function z(t,e){return t.msg=h[e],e}function R(t){return(t<<1)-(4<t?9:0)}function C(t){for(var e=t.length;0<=--e;)t[e]=0}function P(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function N(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,P(t.strm)}function V(t,e){t.pending_buf[t.pending++]=e}function M(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function j(t,e){var r,n,i=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,h=t.strstart>t.w_size-E?t.strstart-(t.w_size-E):0,u=t.window,c=t.w_mask,f=t.prev,l=t.strstart+T,p=u[s+o-1],d=u[s+o];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(u[(r=e)+o]===d&&u[r+o-1]===p&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<l);if(n=T-(l-s),s=l-T,o<n){if(t.match_start=e,a<=(o=n))break;p=u[s+o-1],d=u[s+o]}}}while((e=f[e&c])>h&&0!=--i);return o<=t.lookahead?o:t.lookahead}function H(t){var e,r,n,s,h,u,c,f,l,p,d=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-E)){for(i.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=r=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--r;);for(e=r=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--r;);s+=d}if(0===t.strm.avail_in)break;if(u=t.strm,c=t.window,f=t.strstart+t.lookahead,p=void 0,(l=s)<(p=u.avail_in)&&(p=l),r=0===p?0:(u.avail_in-=p,i.arraySet(c,u.input,u.next_in,p,f),1===u.state.wrap?u.adler=o(u.adler,c,p,f):2===u.state.wrap&&(u.adler=a(u.adler,c,p,f)),u.next_in+=p,u.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=x)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+x-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<E&&0!==t.strm.avail_in)}function q(t,e){for(var r,n;;){if(t.lookahead<E){if(H(t),t.lookahead<E&&e===u)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-E&&(t.match_length=j(t,r)),t.match_length>=x)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===c?(N(t,!0),0===t.strm.avail_out?k:O):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function L(t,e){for(var r,n,i;;){if(t.lookahead<E){if(H(t),t.lookahead<E&&e===u)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-E&&(t.match_length=j(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-x,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,n&&(N(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===c?(N(t,!0),0===t.strm.avail_out?k:O):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function F(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function U(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*w),this.dyn_dtree=new i.Buf16(2*(2*_+1)),this.bl_tree=new i.Buf16(2*(2*b+1)),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(S+1),this.heap=new i.Buf16(2*m+1),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*m+1),C(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function K(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=g,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?D:B,t.adler=2===e.wrap?0:1,e.last_flush=u,s._tr_init(e),f):z(t,l)}function Z(t){var e,r=K(t);return r===f&&((e=t.state).window_size=2*e.w_size,C(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0),r}function $(t,e,r,n,s,o){if(!t)return l;var a=1;if(e===p&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||y<s||r!==v||n<8||15<n||e<0||9<e||o<0||d<o)return z(t,l);8===n&&(n=9);var h=new U;return(t.state=h).strm=t,h.wrap=a,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+x-1)/x),h.window=new i.Buf8(2*h.w_size),h.head=new i.Buf16(h.hash_size),h.prev=new i.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new i.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=o,h.method=r,Z(t)}n=[new F(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===u)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-E&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===c?(N(t,!0),0===t.strm.avail_out?k:O):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)})),new F(4,4,8,4,q),new F(4,5,16,8,q),new F(4,6,32,32,q),new F(4,4,16,16,L),new F(8,16,32,32,L),new F(8,16,128,128,L),new F(8,32,128,256,L),new F(32,128,258,1024,L),new F(32,258,258,4096,L)],r.deflateInit=function(t,e){return $(t,e,v,15,8,0)},r.deflateInit2=$,r.deflateReset=Z,r.deflateResetKeep=K,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,f):l},r.deflate=function(t,e){var r,i,o,h;if(!t||!t.state||5<e||e<0)return t?z(t,l):l;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==c)return z(t,0===t.avail_out?-5:l);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===D)if(2===i.wrap)t.adler=0,V(i,31),V(i,139),V(i,8),i.gzhead?(V(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),V(i,255&i.gzhead.time),V(i,i.gzhead.time>>8&255),V(i,i.gzhead.time>>16&255),V(i,i.gzhead.time>>24&255),V(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),V(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(V(i,255&i.gzhead.extra.length),V(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(V(i,0),V(i,0),V(i,0),V(i,0),V(i,0),V(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),V(i,3),i.status=B);else{var p=v+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=B,M(i,p),0!==i.strstart&&(M(i,t.adler>>>16),M(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),P(t),o=i.pending,i.pending!==i.pending_buf_size));)V(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),P(t),o=i.pending,i.pending===i.pending_buf_size)){h=1;break}V(i,h=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0)}while(0!==h);i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),0===h&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),P(t),o=i.pending,i.pending===i.pending_buf_size)){h=1;break}V(i,h=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0)}while(0!==h);i.gzhead.hcrc&&i.pending>o&&(t.adler=a(t.adler,i.pending_buf,i.pending-o,o)),0===h&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&P(t),i.pending+2<=i.pending_buf_size&&(V(i,255&t.adler),V(i,t.adler>>8&255),t.adler=0,i.status=B)):i.status=B),0!==i.pending){if(P(t),0===t.avail_out)return i.last_flush=-1,f}else if(0===t.avail_in&&R(e)<=R(r)&&e!==c)return z(t,-5);if(666===i.status&&0!==t.avail_in)return z(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==u&&666!==i.status){var d=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===u)return A;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===c?(N(t,!0),0===t.strm.avail_out?k:O):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,n,i,o,a=t.window;;){if(t.lookahead<=T){if(H(t),t.lookahead<=T&&e===u)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){o=t.strstart+T;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);t.match_length=T-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=s._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===c?(N(t,!0),0===t.strm.avail_out?k:O):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):n[i.level].func(i,e);if(d!==k&&d!==O||(i.status=666),d===A||d===k)return 0===t.avail_out&&(i.last_flush=-1),f;if(d===I&&(1===e?s._tr_align(i):5!==e&&(s._tr_stored_block(i,0,0,!1),3===e&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),P(t),0===t.avail_out))return i.last_flush=-1,f}return e!==c?f:i.wrap<=0?1:(2===i.wrap?(V(i,255&t.adler),V(i,t.adler>>8&255),V(i,t.adler>>16&255),V(i,t.adler>>24&255),V(i,255&t.total_in),V(i,t.total_in>>8&255),V(i,t.total_in>>16&255),V(i,t.total_in>>24&255)):(M(i,t.adler>>>16),M(i,65535&t.adler)),P(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?f:1)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==D&&69!==e&&73!==e&&91!==e&&103!==e&&e!==B&&666!==e?z(t,l):(t.state=null,e===B?z(t,-3):f):l},r.deflateSetDictionary=function(t,e){var r,n,s,a,h,u,c,p,d=e.length;if(!t||!t.state)return l;if(2===(a=(r=t.state).wrap)||1===a&&r.status!==D||r.lookahead)return l;for(1===a&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(C(r.head),r.strstart=0,r.block_start=0,r.insert=0),p=new i.Buf8(r.w_size),i.arraySet(p,e,d-r.w_size,r.w_size,0),e=p,d=r.w_size),h=t.avail_in,u=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(r);r.lookahead>=x;){for(n=r.strstart,s=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+x-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--s;);r.strstart=n,r.lookahead=x-1,H(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,t.next_in=u,t.input=c,t.avail_in=h,r.wrap=a,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,r){var n=t("../utils/common"),i=0,s=1;function o(t){for(var e=t.length;0<=--e;)t[e]=0}var a=0,h=29,u=256,c=u+1+h,f=30,l=19,p=2*c+1,d=15,g=16,v=7,y=256,m=16,_=17,b=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(c+2));o(E);var D=new Array(2*f);o(D);var B=new Array(512);o(B);var A=new Array(256);o(A);var I=new Array(h);o(I);var k,O,z,R=new Array(f);function C(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function P(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function N(t){return t<256?B[t]:B[256+(t>>>7)]}function V(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function M(t,e,r){t.bi_valid>g-r?(t.bi_buf|=e<<t.bi_valid&65535,V(t,t.bi_buf),t.bi_buf=e>>g-t.bi_valid,t.bi_valid+=r-g):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function j(t,e,r){M(t,r[2*e],r[2*e+1])}function H(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function q(t,e,r){var n,i,s=new Array(d+1),o=0;for(n=1;n<=d;n++)s[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=H(s[a]++,a))}}function L(t){var e;for(e=0;e<c;e++)t.dyn_ltree[2*e]=0;for(e=0;e<f;e++)t.dyn_dtree[2*e]=0;for(e=0;e<l;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*y]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function F(t){8<t.bi_valid?V(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function U(t,e,r,n){var i=2*e,s=2*r;return t[i]<t[s]||t[i]===t[s]&&n[e]<=n[r]}function K(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&U(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!U(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function Z(t,e,r){var n,i,s,o,a=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],i=t.pending_buf[t.l_buf+a],a++,0===n?j(t,i,e):(j(t,(s=A[i])+u+1,e),0!==(o=w[s])&&M(t,i-=I[s],o),j(t,s=N(--n),r),0!==(o=S[s])&&M(t,n-=R[s],o)),a<t.last_lit;);j(t,y,e)}function $(t,e){var r,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=p,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=o[2*i+1]);for(e.max_code=u,r=t.heap_len>>1;1<=r;r--)K(t,s,r);for(i=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],K(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,K(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,o,a,h=e.dyn_tree,u=e.max_code,c=e.stat_desc.static_tree,f=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,g=e.stat_desc.extra_base,v=e.stat_desc.max_length,y=0;for(s=0;s<=d;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<p;r++)v<(s=h[2*h[2*(n=t.heap[r])+1]+1]+1)&&(s=v,y++),h[2*n+1]=s,u<n||(t.bl_count[s]++,o=0,g<=n&&(o=l[n-g]),a=h[2*n],t.opt_len+=a*(s+o),f&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==y){do{for(s=v-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[v]--,y-=2}while(0<y);for(s=v;0!==s;s--)for(n=t.bl_count[s];0!==n;)u<(i=t.heap[--r])||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),q(s,u,t.bl_count)}function W(t,e,r){var n,i,s=-1,o=e[1],a=0,h=7,u=4;for(0===o&&(h=138,u=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++a<h&&i===o||(a<u?t.bl_tree[2*i]+=a:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[2*m]++):a<=10?t.bl_tree[2*_]++:t.bl_tree[2*b]++,s=i,(a=0)===o?(h=138,u=3):i===o?(h=6,u=3):(h=7,u=4))}function G(t,e,r){var n,i,s=-1,o=e[1],a=0,h=7,u=4;for(0===o&&(h=138,u=3),n=0;n<=r;n++)if(i=o,o=e[2*(n+1)+1],!(++a<h&&i===o)){if(a<u)for(;j(t,i,t.bl_tree),0!=--a;);else 0!==i?(i!==s&&(j(t,i,t.bl_tree),a--),j(t,m,t.bl_tree),M(t,a-3,2)):a<=10?(j(t,_,t.bl_tree),M(t,a-3,3)):(j(t,b,t.bl_tree),M(t,a-11,7));s=i,(a=0)===o?(h=138,u=3):i===o?(h=6,u=3):(h=7,u=4)}}o(R);var J=!1;function X(t,e,r,i){var s,o,h,u;M(t,(a<<1)+(i?1:0),3),o=e,h=r,u=!0,F(s=t),u&&(V(s,h),V(s,~h)),n.arraySet(s.pending_buf,s.window,o,h,s.pending),s.pending+=h}r._tr_init=function(t){J||(function(){var t,e,r,n,i,s=new Array(d+1);for(n=r=0;n<h-1;n++)for(I[n]=r,t=0;t<1<<w[n];t++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(R[n]=i,t=0;t<1<<S[n];t++)B[i++]=n;for(i>>=7;n<f;n++)for(R[n]=i<<7,t=0;t<1<<S[n]-7;t++)B[256+i++]=n;for(e=0;e<=d;e++)s[e]=0;for(t=0;t<=143;)E[2*t+1]=8,t++,s[8]++;for(;t<=255;)E[2*t+1]=9,t++,s[9]++;for(;t<=279;)E[2*t+1]=7,t++,s[7]++;for(;t<=287;)E[2*t+1]=8,t++,s[8]++;for(q(E,c+1,s),t=0;t<f;t++)D[2*t+1]=5,D[2*t]=H(t,5);k=new C(E,w,u+1,c,d),O=new C(D,S,0,f,d),z=new C(new Array(0),x,0,l,v)}(),J=!0),t.l_desc=new P(t.dyn_ltree,k),t.d_desc=new P(t.dyn_dtree,O),t.bl_desc=new P(t.bl_tree,z),t.bi_buf=0,t.bi_valid=0,L(t)},r._tr_stored_block=X,r._tr_flush_block=function(t,e,r,n){var o,a,h=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return i;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<u;e++)if(0!==t.dyn_ltree[2*e])return s;return i}(t)),$(t,t.l_desc),$(t,t.d_desc),h=function(t){var e;for(W(t,t.dyn_ltree,t.l_desc.max_code),W(t,t.dyn_dtree,t.d_desc.max_code),$(t,t.bl_desc),e=l-1;3<=e&&0===t.bl_tree[2*T[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==e?X(t,e,r,n):4===t.strategy||a===o?(M(t,2+(n?1:0),3),Z(t,E,D)):(M(t,4+(n?1:0),3),function(t,e,r,n){var i;for(M(t,e-257,5),M(t,r-1,5),M(t,n-4,4),i=0;i<n;i++)M(t,t.bl_tree[2*T[i]+1],3);G(t,t.dyn_ltree,e-1),G(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),Z(t,t.dyn_ltree,t.dyn_dtree)),L(t),n&&F(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){var e;M(t,2,3),j(t,y,E),16===(e=t).bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,r){var n=t("./zlib/deflate"),i=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),h=Object.prototype.toString,u=0,c=-1,f=0,l=8;function p(t){if(!(this instanceof p))return new p(t);this.options=i.assign({level:c,method:l,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==u)throw new Error(o[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var d;if(d="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==u)throw new Error(o[r]);this._dict_set=!0}}function d(t,e){var r=new p(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}p.prototype.push=function(t,e){var r,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,o))&&r!==u)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u):2!==o||(this.onEnd(u),!(a.avail_out=0))},p.prototype.onData=function(t){this.chunks.push(t)},p.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=p,r.deflate=d,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,d(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js");var Et=Tt.exports;function Dt(t,e){var r=new et;return r.setPublicKey(e),r.encryptLong(t)}var Bt={appId:"default",channel:"",organization:"",apiHost:"fp-it.fengkongcloud.com",apiPath:"/deviceprofile/v4",apiProtocol:"https",publicKey:""},At=Array.isArray,It="object"==typeof St&&St&&St.Object===Object&&St,kt="object"==typeof self&&self&&self.Object===Object&&self,Ot=It||kt||Function("return this")(),zt=Ot.Symbol,Rt=zt,Ct=Object.prototype,Pt=Ct.hasOwnProperty,Nt=Ct.toString,Vt=Rt?Rt.toStringTag:void 0;var Mt=function(t){var e=Pt.call(t,Vt),r=t[Vt];try{t[Vt]=void 0;var n=!0}catch(t){}var i=Nt.call(t);return n&&(e?t[Vt]=r:delete t[Vt]),i},jt=Object.prototype.toString;var Ht=Mt,qt=function(t){return jt.call(t)},Lt=zt?zt.toStringTag:void 0;var Ft=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Lt&&Lt in Object(t)?Ht(t):qt(t)};var Ut=Ft,Kt=function(t){return null!=t&&"object"==typeof t};var Zt=function(t){return"symbol"==typeof t||Kt(t)&&"[object Symbol]"==Ut(t)},$t=At,Wt=Zt,Gt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jt=/^\w*$/;var Xt=function(t,e){if($t(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Wt(t))||(Jt.test(t)||!Gt.test(t)||null!=e&&t in Object(e))};var Yt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Qt=Ft,te=Yt;var ee,re=function(t){if(!te(t))return!1;var e=Qt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},ne=Ot["__core-js_shared__"],ie=(ee=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||""))?"Symbol(src)_1."+ee:"";var se=function(t){return!!ie&&ie in t},oe=Function.prototype.toString;var ae=re,he=se,ue=Yt,ce=function(t){if(null!=t){try{return oe.call(t)}catch(t){}try{return t+""}catch(t){}}return""},fe=/^\[object .+?Constructor\]$/,le=Function.prototype,pe=Object.prototype,de=le.toString,ge=pe.hasOwnProperty,ve=RegExp("^"+de.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ye=function(t){return!(!ue(t)||he(t))&&(ae(t)?ve:fe).test(ce(t))},me=function(t,e){return null==t?void 0:t[e]};var _e=function(t,e){var r=me(t,e);return ye(r)?r:void 0},be=_e(Object,"create"),we=be;var Se=function(){this.__data__=we?we(null):{},this.size=0};var xe=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Te=be,Ee=Object.prototype.hasOwnProperty;var De=function(t){var e=this.__data__;if(Te){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Ee.call(e,t)?e[t]:void 0},Be=be,Ae=Object.prototype.hasOwnProperty;var Ie=be;var ke=Se,Oe=xe,ze=De,Re=function(t){var e=this.__data__;return Be?void 0!==e[t]:Ae.call(e,t)},Ce=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ie&&void 0===e?"__lodash_hash_undefined__":e,this};function Pe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Pe.prototype.clear=ke,Pe.prototype.delete=Oe,Pe.prototype.get=ze,Pe.prototype.has=Re,Pe.prototype.set=Ce;var Ne=Pe;var Ve=function(){this.__data__=[],this.size=0};var Me=function(t,e){return t===e||t!=t&&e!=e};var je=function(t,e){for(var r=t.length;r--;)if(Me(t[r][0],e))return r;return-1},He=je,qe=Array.prototype.splice;var Le=je;var Fe=je;var Ue=je;var Ke=Ve,Ze=function(t){var e=this.__data__,r=He(e,t);return!(r<0)&&(r==e.length-1?e.pop():qe.call(e,r,1),--this.size,!0)},$e=function(t){var e=this.__data__,r=Le(e,t);return r<0?void 0:e[r][1]},We=function(t){return Fe(this.__data__,t)>-1},Ge=function(t,e){var r=this.__data__,n=Ue(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Je(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Je.prototype.clear=Ke,Je.prototype.delete=Ze,Je.prototype.get=$e,Je.prototype.has=We,Je.prototype.set=Ge;var Xe=Je,Ye=_e(Ot,"Map"),Qe=Ne,tr=Xe,er=Ye;var rr=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var nr=function(t,e){var r=t.__data__;return rr(e)?r["string"==typeof e?"string":"hash"]:r.map},ir=nr;var sr=nr;var or=nr;var ar=nr;var hr=function(){this.size=0,this.__data__={hash:new Qe,map:new(er||tr),string:new Qe}},ur=function(t){var e=ir(this,t).delete(t);return this.size-=e?1:0,e},cr=function(t){return sr(this,t).get(t)},fr=function(t){return or(this,t).has(t)},lr=function(t,e){var r=ar(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}pr.prototype.clear=hr,pr.prototype.delete=ur,pr.prototype.get=cr,pr.prototype.has=fr,pr.prototype.set=lr;var dr=pr;function gr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(gr.Cache||dr),r}gr.Cache=dr;var vr=gr;var yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mr=/\\(\\)?/g,_r=function(t){var e=vr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(yr,(function(t,r,n,i){e.push(n?i.replace(mr,"$1"):r||t)})),e}));var br=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},wr=At,Sr=Zt,xr=zt?zt.prototype:void 0,Tr=xr?xr.toString:void 0;var Er=function t(e){if("string"==typeof e)return e;if(wr(e))return br(e,t)+"";if(Sr(e))return Tr?Tr.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r},Dr=Er;var Br=At,Ar=Xt,Ir=_r,kr=function(t){return null==t?"":Dr(t)};var Or=Zt;var zr=function(t,e){return Br(t)?t:Ar(t,e)?[t]:Ir(kr(t))},Rr=function(t){if("string"==typeof t||Or(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Cr=function(t,e){for(var r=0,n=(e=zr(e,t)).length;null!=t&&r<n;)t=t[Rr(e[r++])];return r&&r==n?t:void 0};var Pr,Nr=function(t,e,r){var n=null==t?void 0:Cr(t,e);return void 0===n?r:n};!function(t){t.wx="wx",t.qq="qq",t.tt="tt",t.my="my",t.taobao="taobao"}(Pr||(Pr={}));var Vr="wx",Mr={isWx:Vr===Pr.wx,isQq:Vr===Pr.qq,isTt:Vr===Pr.tt,isAli:Vr===Pr.my,isTaobao:Vr===Pr.taobao},jr=wx,Hr={exports:{}};!function(t,e){!function(r){if(null!=e&&"number"!=typeof e.nodeType)t.exports=r();else{var n=r(),i="undefined"!=typeof self?self:$.global;"function"!=typeof i.btoa&&(i.btoa=n.btoa),"function"!=typeof i.atob&&(i.atob=n.atob)}}((function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function e(t){this.message=t}return e.prototype=new Error,e.prototype.name="InvalidCharacterError",{btoa:function(r){for(var n,i,s=String(r),o=0,a=t,h="";s.charAt(0|o)||(a="=",o%1);h+=a.charAt(63&n>>8-o%1*8)){if((i=s.charCodeAt(o+=3/4))>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return h},atob:function(r){var n=String(r).replace(/[=]+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,s,o=0,a=0,h="";s=n.charAt(a++);~s&&(i=o%4?64*i+s:s,o++%4)?h+=String.fromCharCode(255&i>>(-2*o&6)):0)s=t.indexOf(s);return h}}}))}(Hr,Hr.exports);var qr=new(function(){function t(){this.smInfo={storageName:"",SMID:"",smData:"",smEncryptedData:"",priId:"",ep:"",uid:"",retryCnt:0,isNeedStop:!1,smAesData:""},this.userAuthInfo={openId:"",unionId:""},this.smFpParams={}}return t.prototype.getSmInfo=function(t){return this.smInfo[t]},t.prototype.setSmInfo=function(t,e){this.smInfo[t]=e},t.prototype.getUserAuthInfo=function(t){return this.userAuthInfo[t]},t.prototype.setUserAuthInfo=function(t,e){this.userAuthInfo[t]=e},t}());function Lr(){try{return jr.getLaunchOptionsSync()}catch(t){return{}}}function Fr(){try{return jr.getSystemInfoSync()}catch(t){return{}}}function Ur(){var t=[new Promise((function(t){var e={screenBright:-1};try{jr.getScreenBrightness({success:function(r){try{var n=Mr.isAli||Mr.isTaobao?r.brightness:r.value;t({screenBright:n})}catch(r){t(e)}},fail:function(){t(e)}})}catch(r){t(e)}})),new Promise((function(t){var e={networkType:"",signalStrength:0,hasSystemProxy:!1};try{jr.getNetworkType({success:function(r){try{r.networkType&&(e.networkType=r.networkType),r.signalStrength&&(e.signalStrength=r.signalStrength),r.hasSystemProxy&&(e.hasSystemProxy=r.hasSystemProxy),t(e)}catch(r){t(e)}},fail:function(){t(e)}})}catch(r){t(e)}})),Fr()];return(Mr.isWx||Mr.isTt)&&t.push(new Promise((function(t){var e={connectedWifi:{}};try{Mr.isWx?jr.startWifi({success:function(){jr.getConnectedWifi({complete:function(r){try{t(r.wifi?{connectedWifi:r.wifi}:e)}catch(r){t(e)}}})},fail:function(){t(e)}}):Mr.isTt&&jr.getConnectedWifi({complete:function(r){try{t(r?{connectedWifi:r}:e)}catch(r){t(e)}}})}catch(r){t(e)}}))),Mr.isQq||(Mr.isTt||t.push(new Promise((function(t){try{var e=jr.createOffscreenCanvas({type:"2d",width:200,height:200}).getContext("2d"),r="http://www.ishumei.com";e.font="24px 'Arial'",e.fillStyle="#e88",e.fillRect(120,1,60,22),e.fillStyle="#f99",e.fillText(r,2,15),e.fillStyle="rgba(120, 180, 0, 0.7)",e.fillText(r,4,17);var n=e.canvas.toDataURL().replace("data:image/png;base64,","");t({canvas:function(t){var e,r,n,i="";for(e=0,r=(t+="").length;e<r;e++)i+=(n=t.charCodeAt(e).toString(16)).length<2?"0"+n:n;return i}(Hr.exports.atob(n).slice(-16,-12))})}catch(e){t({canvas:""})}}))),Mr.isTaobao||t.push(new Promise((function(t){try{var e=Mr.isAli||Mr.isTaobao?"getDeviceBaseInfo":"getDeviceInfo";Mr.isTt&&(e="getDeviceInfoSync");var r=jr[e]();r.model&&delete r.model,t(r)}catch(e){t({})}}))),Mr.isTt||t.push(new Promise((function(t){try{var e=Mr.isAli||Mr.isTaobao?"checkIsSupportIfaaAuthentication":"checkIsSupportSoterAuthentication";jr[e]({success:function(e){var r=e.supportMode;t({fingerPrintSupport:r.includes("fingerPrint")?"1":"0",facialSupport:r.includes("facial")?"1":"0"})},fail:function(e){t({fingerPrintSupport:"-1",facialSupport:"-1"})}})}catch(e){t({fingerPrintSupport:"-1",facialSupport:"-1"})}})))),Mr.isWx&&(!1!==Nr(qr.smConf,"authConf.nfc",!0)&&t.push(new Promise((function(t){try{var e=jr.getNFCAdapter();e.startDiscovery({success:function(){t({nfc:"1"}),e.stopDiscovery()},fail:function(e){t({nfc:"0",nfcErrorMsg:e.errMsg})}})}catch(e){t({nfc:"-1"})}}))),t.push(new Promise((function(t){var e={HCE:"0"};try{jr.getHCEState({success:function(){try{t({HCE:"1"})}catch(r){t(e)}},fail:function(){t(e)}})}catch(r){t(e)}}))),t.push(new Promise((function(t){var e={wifiip:{localip:"",errMsg:"",netmask:""}};try{jr.getLocalIPAddress({success:function(r){try{r.errMsg&&(e.wifiip.errMsg=r.errMsg),r.netmask&&(e.wifiip.netmask=r.netmask),r.localip&&(e.wifiip.localip=r.localip),t(e)}catch(r){t(e)}},fail:function(r){r.errMsg&&(e.wifiip.errMsg=r.errMsg),t(e)}})}catch(r){t(e)}}))),t.push(function(){try{return{accountInfo:jr.getAccountInfoSync()}}catch(t){return{}}}()),t.push(new Promise((function(t){var e={userAgent:""};jr.getRendererUserAgent().then((function(e){t({userAgent:e})})).catch((function(){t(e)})),setTimeout((function(){return t({userAgent:"userAgent获取超时"})}),3e3)}))),t.push(new Promise((function(t){try{t({performance:jr.getPerformance()})}catch(e){t({performance:{}})}}))),t.push(new Promise((function(t){try{var e={};jr.getBatteryInfo({success:function(r){try{t({batteryInfo:r})}catch(r){t(e)}},fail:function(){t(e)}})}catch(e){t({batteryInfo:{}})}}))),t.push(new Promise((function(t){try{var e={};jr.getSetting({success:function(r){try{t({setting:r})}catch(r){t(e)}},fail:function(){t(e)}})}catch(e){t({setting:{}})}}))),t.push(new Promise((function(t){try{var e={};jr.getAvailableAudioSources({success:function(r){try{t({availableAudioSources:r})}catch(r){t(e)}},fail:function(){t(e)}})}catch(e){t({availableAudioSources:{}})}})))),t.push({t:(new Date).getTime()}),Promise.all(t)}var Kr=function(){return Kr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Kr.apply(this,arguments)};function Zr(t,e,r,n){try{!function(t){try{jr.request({url:t.url,data:JSON.stringify(t.data),header:t.header,method:t.method||"POST",responseType:t.responseType||"json",success:t.success||function(){},fail:t.fail||function(){}})}catch(e){t.fail()}}({url:t,data:e,method:"POST",responseType:"text",success:r,fail:n})}catch(t){}}"function"==typeof SuppressedError&&SuppressedError;var $r="3.0.0",Wr="1.0.0";function Gr(t,e){try{jr.setStorage({key:t,data:e})}catch(t){}}function Jr(t){try{return Mr.isAli||Mr.isTaobao?jr.getStorageSync({key:t}).data:jr.getStorageSync(t)}catch(t){}}function Xr(t,e){try{jr.getFileSystemManager().writeFile({filePath:"".concat(jr.env.USER_DATA_PATH,"/").concat(t,".txt"),data:e,encoding:"utf8",success:function(){},fail:function(){}})}catch(t){}}function Yr(t){try{var e="".concat(jr.env.USER_DATA_PATH,"/").concat(t,".txt"),r=jr.getFileSystemManager().readFileSync(e,"utf8");return Mr.isAli||Mr.isTaobao?r.data:r}catch(t){}}function Qr(t){qr.setSmInfo("SMID",t);var e=qr.smInfo.storageName;Gr(e,t),Xr(e,t)}function tn(){var t,e,r,n,i,s,o,a=(t=new Date,e=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),n=t.getDate().toString(),i=t.getHours().toString(),s=t.getMinutes().toString(),o=t.getSeconds().toString(),e+(r=r<=9?"0"+r:r)+(n=n<=9?"0"+n:n)+(i=i<=9?"0"+i:i)+(s=s<=9?"0"+s:s)+(o=o<=9?"0"+o:o))+gt(en())+"00";return a+gt("smsk_weapp_"+a).substr(0,14)+0}function en(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function rn(t){if(Yt(t)){var e="";return Object.keys(t).sort().forEach((function(r){e+=rn(t[r])})),e}return t?t.toString().replace(/,/g,""):""}function nn(t){return gt(rn(t))}function sn(){var t="SMFP",e="smidV2",r=Jr(e)||Yr(t);if(r)return r;var n=tn();return Gr(e,n),Xr(t,n),n}var on={timer:null,timeStamp:0},an=+new Date,hn=+new Date+"-"+Math.floor(1e8*Math.random());function un(t){var e=qr.smConf,r=e.apiProtocol+"://"+e.apiHost+e.apiPath,n=cn(t),i=n.errObj,s=n.encrypedData;qr.setSmInfo("smEncryptedData",s),Zr(r,i)}function cn(t){var e=qr.smConf,r=e.appId,n=e.organization,i=qr.smInfo,s=i.SMID,o=i.ep,a={appId:r,organization:n,os:"weapp",version:$r,sdkVer:Wr,rtype:"exception",smid:sn(),box:s,gBox:"",tn:"",e:t},h={appId:r,organization:n,ep:o,data:wt(JSON.stringify(a)),os:"weapp",encode:1,compress:0};return{errObj:h,encrypedData:wt(JSON.stringify(h))}}function fn(t){var e=qr.smConf,r=e.apiProtocol+"://"+e.apiHost+e.apiPath,n=gn(t);qr.setSmInfo("smEncryptedData",wt(JSON.stringify(n))),Zr(r,n,ln,ln)}function ln(t){if(1100===Nr(t,"data.code"))return clearTimeout(on.timer),qr.setSmInfo("retryCnt",0),void Qr(Nr(t,"data.detail.deviceId",""));var e=qr.getSmInfo("retryCnt");e>12?on.timeStamp=3e4:e>9?on.timeStamp=15e3:e>6?on.timeStamp=5e3:e>3&&(on.timeStamp=2e3),on.timer=setTimeout((function(){e++,qr.setSmInfo("retryCnt",e),1902===Nr(t,"data.code")&&e<4?Ur().then((function(t){var e=pn(t);qr.smInfo.isNeedStop||fn(e)})):fn()}),on.timeStamp)}function pn(t){for(var e=qr.smConf,r=e.appId,n=e.organization,i=e.channel,s=qr.smInfo,o=s.SMID,a=s.priId,h=+new Date-an,u={},c=0;c<t.length;c++)Object.assign(u,t[c]);var f=qr.getUserAuthInfo("openId"),l=qr.getUserAuthInfo("unionId");Object.assign(u,Kr({organization:n,appId:r,os:"weapp",version:$r,sdkVer:Wr,rtype:"all",smid:sn(),gBox:"",box:o,res:"".concat(u.screenWidth,"_").concat(u.screenHeight),channel:i,time:h,sessionId:hn,subVersion:Wr,weAppVerion:u.version,launchOptions:Lr()},Mr.isWx?{openId:f,unionId:l}:{})),Object.assign(u,{tn:nn(u)}),qr.setSmInfo("smData",u);try{u=function(t){var e=JSON.stringify(t);return console.log(e,"压缩"),Et.gzip(e,{to:"string"})}(u),u=wt(u)}catch(t){return un("gzip_failed"),void qr.setSmInfo("isNeedStop",!0)}try{u=function(t,e){mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){for(var e=t.words,r=t.sigBytes-1;!(e[r>>>2]>>>24-r%4*8&255);)r--;t.sigBytes=r+1}};var r=mt.enc.Utf8.parse("0102030405060708"),n=mt.enc.Utf8.parse(e),i="object"==typeof t?JSON.stringify(t):t;return mt.AES.encrypt(i,n,{iv:r,mode:mt.mode.CBC,padding:mt.pad.ZeroPadding}).ciphertext.toString()}(u,a),qr.setSmInfo("smAesData",u)}catch(t){return un("aes_failed"),void qr.setSmInfo("isNeedStop",!0)}return u}function dn(){var t=qr.smConf,e=t.appId,r=t.organization,n=t.publicKey,i=qr.smInfo,s=i.ep,o=i.smData;if(""===e||""===s||""===r||""===JSON.stringify(o))return"OUTTER_TN_IN_EMPTY";var a=JSON.stringify(o)+s+r+e+"sm_tn";try{return wt(Dt(gt(a),n))}catch(t){return"OUTTER_TN_RSA_FAILED"}}function gn(t){var e=qr.smConf,r=e.appId,n=e.organization,i=qr.smInfo,s=i.ep,o=i.smAesData;return Kr({appId:r,organization:n,ep:s,data:t||o,os:"weapp",encode:6,compress:2},Mr.isWx?{tn:dn()}:{})}var vn={initConf:function(t){!function(t){qr.smConf=Object.assign({},Bt,t),t||(un("config_empty"),qr.setSmInfo("isNeedStop",!0));var e=qr.smConf,r=e.publicKey,n=e.organization;""===r&&(un("publicKey_empty"),qr.setSmInfo("isNeedStop",!0)),""===n&&(un("organization_empty"),qr.setSmInfo("isNeedStop",!0));var i=en();qr.setSmInfo("uid",i);var s=gt(i).slice(0,16),o=".thumbcache_".concat(gt(n));qr.setSmInfo("priId",s),qr.setSmInfo("storageName",o);try{var a=Dt(i,r);qr.setSmInfo("ep",a)}catch(t){un("rsa_failed"),qr.setSmInfo("isNeedStop",!0)}}(t);var e=function(){var t=qr.getSmInfo("SMID");if(t)return t;var e=qr.smInfo.storageName;return Jr(e)||Yr(e)}();e&&Qr(e),Ur().then((function(t){console.log("初始化接口采集到的字段信息:",t),t&&t.length&&(t[t.length-1].collectCost=(new Date).getTime()-t[t.length-1].t);var e=pn(t);if(!qr.smInfo.isNeedStop)if(Mr.isTaobao){var r=gn(e);qr.smFpParams=JSON.stringify(r);var n=wt(qr.smFpParams);qr.setSmInfo("smEncryptedData",n)}else fn(e)}))},getDeviceId:function(){return new Promise((function(t){var e=function(){var e,r,n=(e=qr.getSmInfo("SMID"))?"B"+e:(r=qr.getSmInfo("smEncryptedData"))?"D"+r:"";if(n)return t(n),n};e()||(Ur().then((function(r){if(!e()){r&&r.length&&(r[r.length-1].collectCost=(new Date).getTime()-r[r.length-1].t);var n=gn(pn(r)),i=wt(JSON.stringify(n));qr.setSmInfo("smEncryptedData",i),t("D"+i)}})),setTimeout((function(){var e=cn("getDeviceId_timeout").encrypedData;t("D"+e)}),1500))}))},getDeviceParams:function(){return new Promise((function(t){var e=qr.smFpParams;e.os&&t(e),Ur().then((function(e){e&&e.length&&(e[e.length-1].collectCost=(new Date).getTime()-e[e.length-1].t);var r=gn(pn(e));t(JSON.stringify(r))}))}))},setDeviceIdInTaobao:function(t){void 0===t&&(t=""),Qr(t)},setOpenId:function(t){void 0===t&&(t=""),qr.setUserAuthInfo("openId",t)},setUnionId:function(t){void 0===t&&(t=""),qr.setUserAuthInfo("unionId",t)}};module.exports=vn;
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ Component({
2
+
3
+
4
+ })
package/src/index.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "component": true,
3
+ "componentGenerics": {
4
+ "genericsTest": true
5
+ }
6
+ }
package/src/index.wxml ADDED
@@ -0,0 +1 @@
1
+ <view>入口文件</view>
package/src/index.wxss ADDED
@@ -0,0 +1,4 @@
1
+
2
+ .index {
3
+ color: green;
4
+ }
package/src/request.js ADDED
@@ -0,0 +1,58 @@
1
+ const request = (url, method = 'POST', data = {}, header = {}) => new Promise((resolve, reject) => {
2
+ wx.request({
3
+ url,
4
+ method,
5
+ header,
6
+ dataType: 'json',
7
+ data,
8
+ success(resp) {
9
+ // resp 是原始响应信息,而不是接口响应数据
10
+ if (resp.statusCode >= 200 && resp.statusCode < 300) {
11
+ const data = resp.data
12
+
13
+ if (data.result_code) {
14
+ if (data.result_code !== '200') {
15
+ reject(data.error_message || '接口有点问题,请稍后重试')
16
+ } else {
17
+ resolve(data.biz_response)
18
+ }
19
+ } else if (data.resultCode) {
20
+ if (data.resultCode !== '0000') {
21
+ reject(data.resultDesc || '接口有点问题,请稍后重试')
22
+ } else {
23
+ resolve(data.respData)
24
+ }
25
+ }
26
+ } else {
27
+ // eslint-disable-next-line prefer-promise-reject-errors
28
+ reject('系统开小差了,请稍后重试')
29
+ }
30
+ },
31
+ fail() {
32
+ // eslint-disable-next-line prefer-promise-reject-errors
33
+ reject('网络异常,请稍后重试:--' + url + JSON.stringify(data))
34
+ },
35
+ complete() {
36
+ reject()
37
+ },
38
+ })
39
+ })
40
+
41
+ const post = (uri, reqData) => {
42
+ const header = {}
43
+ header['Content-Type'] = 'application/json'
44
+ return request(uri, 'POST', reqData, header)
45
+ }
46
+
47
+ const get = (uri) => {
48
+ const params = {}
49
+ const header = {}
50
+ header['Content-Type'] = 'application/json'
51
+ return request(uri, 'GET', params, header)
52
+ }
53
+
54
+ module.exports = {
55
+ request,
56
+ post,
57
+ get,
58
+ }
package/src/utils.js ADDED
@@ -0,0 +1,72 @@
1
+ // const apiService = require('./apiService')
2
+ const SMSdk = require('./fp-wx.min')
3
+
4
+ function wxPay(requestPaymentArgs, successCb, failCb) {
5
+ wx.requestPayment({
6
+ ...requestPaymentArgs,
7
+ success(res) {
8
+ return successCb(res)
9
+ },
10
+ fail(res) {
11
+ return failCb(res)
12
+ },
13
+ })
14
+ }
15
+
16
+ // requstArgs:amount,orderToken,appId,payer_uid,combined_tender(传入)
17
+ // function litePosPay(ENV, requestArgs, successCb, failCb) {
18
+ // const params = {
19
+ // ...requestArgs,
20
+ // sub_tender_type: 301,
21
+ // scene_type: 'MINI',
22
+ // }
23
+ // apiService
24
+ // .qrcodePay(ENV, requestArgs.order_token, params)
25
+ // .then((respData) => {
26
+ // if (respData) {
27
+ // const pay_request = respData.pay_request
28
+ // const requestPaymentArgs = {
29
+ // timeStamp: pay_request.time_stamp,
30
+ // nonceStr: pay_request.nonce_str,
31
+ // package: pay_request.package,
32
+ // signType: pay_request.sign_type,
33
+ // paySign: pay_request.pay_sign,
34
+ // extraData: {
35
+ // order_token: requestArgs.order_token,
36
+ // tender_sn: respData.tender_sn,
37
+ // },
38
+ // }
39
+ // // 发起支付
40
+ // wx.requestPayment({
41
+ // ...requestPaymentArgs,
42
+ // success(res) {
43
+ // return successCb(res)
44
+ // },
45
+ // fail(res) {
46
+ // return failCb(res)
47
+ // },
48
+ // })
49
+ // }
50
+ // })
51
+ // .catch((res) => failCb(res))
52
+ // }
53
+
54
+ // lulu的数枚封控sdk
55
+ function initSMSdk() {
56
+ SMSdk.initConf({
57
+ organization: 'Zsq0kDhtR4d2Y9ZwcSBm', // 必填,公司标识,邮件中organization项
58
+ publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfU0WDsoTcsFJIbConxfegYWQ4VuTHrlnXlb/rOi/itqd0MGPOgRRTnKqgRhmH0sCd9m3h/xQ52IuSIEYA/N63iLznB6bWT5wLqCu537ygMuNbDWGEsHYWp+RMhvMx5H/LoXAqJuErCli8fXrwLcK8Jw4lDkBVz6J14wenZyJuPwIDAQAB', // publicKey是v3.0.0版本后必填项,是加密公钥,邮件中publicKey项
59
+ })
60
+ }
61
+
62
+ async function getSMDeviceId() {
63
+ initSMSdk()
64
+ const deviceId = await SMSdk.getDeviceId()
65
+ return deviceId
66
+ }
67
+
68
+ module.exports = {
69
+ wxPay,
70
+ initSMSdk,
71
+ getSMDeviceId
72
+ }