zigap-utils 0.0.21 → 0.0.22
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/README.md +3 -0
- package/dist/components/AddressProvideQR/AddressProvideQR.d.ts +1 -1
- package/dist/components/AddressProvideQR/AddressProvideQR.types.d.ts +1 -0
- package/dist/components/LoginQR/LoginQR.d.ts +1 -1
- package/dist/components/LoginQR/LoginQR.types.d.ts +1 -0
- package/dist/index.cjs.js +14 -19
- package/dist/index.es.js +5269 -7654
- package/dist/util/cryptoUtils.d.ts +2 -2
- package/dist/util/qrService.d.ts +1 -1
- package/dist/xphere/enc.d.ts +12 -0
- package/dist/xphere/sign.d.ts +18 -0
- package/dist/xphere/util.d.ts +10 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";var
|
|
1
|
+
"use client";"use strict";var aa=Object.defineProperty;var sa=(f,e,t)=>e in f?aa(f,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):f[e]=t;var wt=(f,e,t)=>(sa(f,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K0=require("react");function oa(f){if(f&&typeof f=="object"&&"default"in f)return f;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const t in f)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(f,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>f[t]})}}return e.default=f,Object.freeze(e)}const tr=oa(K0);var ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nn(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}function an(f){if(f.__esModule)return f;var e=f.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(f).forEach(function(r){var a=Object.getOwnPropertyDescriptor(f,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return f[r]}})}),t}var Cf={exports:{}},Xt={};const sn=an(tr);/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Jf;function ca(){if(Jf)return Xt;Jf=1;var f=sn,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function y(x,u,o){var c,v={},b=null,C=null;o!==void 0&&(b=""+o),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(C=u.ref);for(c in u)r.call(u,c)&&!i.hasOwnProperty(c)&&(v[c]=u[c]);if(x&&x.defaultProps)for(c in u=x.defaultProps,u)v[c]===void 0&&(v[c]=u[c]);return{$$typeof:e,type:x,key:b,ref:C,props:v,_owner:a.current}}return Xt.Fragment=t,Xt.jsx=y,Xt.jsxs=y,Xt}var Zt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,28 +14,28 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+ue
|
|
17
|
+
*/var ei;function da(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&function(){var f=sn,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),x=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),w=Symbol.iterator,R="@@iterator";function P(p){if(p===null||typeof p!="object")return null;var I=w&&p[w]||p[R];return typeof I=="function"?I:null}var q=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function F(p){{for(var I=arguments.length,L=new Array(I>1?I-1:0),V=1;V<I;V++)L[V-1]=arguments[V];k("error",p,L)}}function k(p,I,L){{var V=q.ReactDebugCurrentFrame,ne=V.getStackAddendum();ne!==""&&(I+="%s",L=L.concat([ne]));var fe=L.map(function(he){return String(he)});fe.unshift("Warning: "+I),Function.prototype.apply.call(console[p],console,fe)}}var T=!1,H=!1,$=!1,Y=!1,X=!1,Q;Q=Symbol.for("react.module.reference");function U(p){return!!(typeof p=="string"||typeof p=="function"||p===r||p===i||X||p===a||p===o||p===c||Y||p===C||T||H||$||typeof p=="object"&&p!==null&&(p.$$typeof===b||p.$$typeof===v||p.$$typeof===y||p.$$typeof===x||p.$$typeof===u||p.$$typeof===Q||p.getModuleId!==void 0))}function A(p,I,L){var V=p.displayName;if(V)return V;var ne=I.displayName||I.name||"";return ne!==""?L+"("+ne+")":L}function n(p){return p.displayName||"Context"}function d(p){if(p==null)return null;if(typeof p.tag=="number"&&F("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case r:return"Fragment";case t:return"Portal";case i:return"Profiler";case a:return"StrictMode";case o:return"Suspense";case c:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case x:var I=p;return n(I)+".Consumer";case y:var L=p;return n(L._context)+".Provider";case u:return A(p,p.render,"ForwardRef");case v:var V=p.displayName||null;return V!==null?V:d(p.type)||"Memo";case b:{var ne=p,fe=ne._payload,he=ne._init;try{return d(he(fe))}catch{return null}}}return null}var g=Object.assign,B=0,S,z,N,D,h,E,K;function j(){}j.__reactDisabledLog=!0;function W(){{if(B===0){S=console.log,z=console.info,N=console.warn,D=console.error,h=console.group,E=console.groupCollapsed,K=console.groupEnd;var p={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}B++}}function re(){{if(B--,B===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},p,{value:S}),info:g({},p,{value:z}),warn:g({},p,{value:N}),error:g({},p,{value:D}),group:g({},p,{value:h}),groupCollapsed:g({},p,{value:E}),groupEnd:g({},p,{value:K})})}B<0&&F("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=q.ReactCurrentDispatcher,we;function Ae(p,I,L){{if(we===void 0)try{throw Error()}catch(ne){var V=ne.stack.trim().match(/\n( *(at )?)/);we=V&&V[1]||""}return`
|
|
18
|
+
`+we+p}}var Me=!1,Se;{var G0=typeof WeakMap=="function"?WeakMap:Map;Se=new G0}function We(p,I){if(!p||Me)return"";{var L=Se.get(p);if(L!==void 0)return L}var V;Me=!0;var ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=ce.current,ce.current=null,W();try{if(I){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(pe){V=pe}Reflect.construct(p,[],he)}else{try{he.call()}catch(pe){V=pe}p.call(he.prototype)}}else{try{throw Error()}catch(pe){V=pe}p()}}catch(pe){if(pe&&V&&typeof pe.stack=="string"){for(var te=pe.stack.split(`
|
|
19
|
+
`),xe=V.stack.split(`
|
|
20
|
+
`),ue=te.length-1,ve=xe.length-1;ue>=1&&ve>=0&&te[ue]!==xe[ve];)ve--;for(;ue>=1&&ve>=0;ue--,ve--)if(te[ue]!==xe[ve]){if(ue!==1||ve!==1)do if(ue--,ve--,ve<0||te[ue]!==xe[ve]){var ge=`
|
|
21
|
+
`+te[ue].replace(" at new "," at ");return p.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",p.displayName)),typeof p=="function"&&Se.set(p,ge),ge}while(ue>=1&&ve>=0);break}}}finally{Me=!1,ce.current=fe,re(),Error.prepareStackTrace=ne}var me=p?p.displayName||p.name:"",_e=me?Ae(me):"";return typeof p=="function"&&Se.set(p,_e),_e}function Oe(p,I,L){return We(p,!1)}function _0(p){var I=p.prototype;return!!(I&&I.isReactComponent)}function Ge(p,I,L){if(p==null)return"";if(typeof p=="function")return We(p,_0(p));if(typeof p=="string")return Ae(p);switch(p){case o:return Ae("Suspense");case c:return Ae("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case u:return Oe(p.render);case v:return Ge(p.type,I,L);case b:{var V=p,ne=V._payload,fe=V._init;try{return Ge(fe(ne),I,L)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,$0={},Qe=q.ReactDebugCurrentFrame;function ze(p){if(p){var I=p._owner,L=Ge(p.type,p._source,I?I.type:null);Qe.setExtraStackFrame(L)}else Qe.setExtraStackFrame(null)}function O0(p,I,L,V,ne){{var fe=Function.call.bind(je);for(var he in p)if(fe(p,he)){var te=void 0;try{if(typeof p[he]!="function"){var xe=Error((V||"React class")+": "+L+" type `"+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[he]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}te=p[he](I,he,V,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){te=ue}te&&!(te instanceof Error)&&(ze(ne),F("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",L,he,typeof te),ze(null)),te instanceof Error&&!(te.message in $0)&&($0[te.message]=!0,ze(ne),F("Failed %s type: %s",L,te.message),ze(null))}}}var qe=Array.isArray;function Fe(p){return qe(p)}function S0(p){{var I=typeof Symbol=="function"&&Symbol.toStringTag,L=I&&p[Symbol.toStringTag]||p.constructor.name||"Object";return L}}function Je(p){try{return f0(p),!1}catch{return!0}}function f0(p){return""+p}function F0(p){if(Je(p))return F("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",S0(p)),f0(p)}var Ne=q.ReactCurrentOwner,u0={key:!0,ref:!0,__self:!0,__source:!0},Q0,l0,He;He={};function z0(p){if(je.call(p,"ref")){var I=Object.getOwnPropertyDescriptor(p,"ref").get;if(I&&I.isReactWarning)return!1}return p.ref!==void 0}function a0(p){if(je.call(p,"key")){var I=Object.getOwnPropertyDescriptor(p,"key").get;if(I&&I.isReactWarning)return!1}return p.key!==void 0}function r0(p,I){if(typeof p.ref=="string"&&Ne.current&&I&&Ne.current.stateNode!==I){var L=d(Ne.current.type);He[L]||(F('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d(Ne.current.type),p.ref),He[L]=!0)}}function q0(p,I){{var L=function(){Q0||(Q0=!0,F("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};L.isReactWarning=!0,Object.defineProperty(p,"key",{get:L,configurable:!0})}}function i0(p,I){{var L=function(){l0||(l0=!0,F("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I))};L.isReactWarning=!0,Object.defineProperty(p,"ref",{get:L,configurable:!0})}}var s0=function(p,I,L,V,ne,fe,he){var te={$$typeof:e,type:p,key:I,ref:L,props:he,_owner:fe};return te._store={},Object.defineProperty(te._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(te,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(te,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.freeze&&(Object.freeze(te.props),Object.freeze(te)),te};function W0(p,I,L,V,ne){{var fe,he={},te=null,xe=null;L!==void 0&&(F0(L),te=""+L),a0(I)&&(F0(I.key),te=""+I.key),z0(I)&&(xe=I.ref,r0(I,ne));for(fe in I)je.call(I,fe)&&!u0.hasOwnProperty(fe)&&(he[fe]=I[fe]);if(p&&p.defaultProps){var ue=p.defaultProps;for(fe in ue)he[fe]===void 0&&(he[fe]=ue[fe])}if(te||xe){var ve=typeof p=="function"?p.displayName||p.name||"Unknown":p;te&&q0(he,ve),xe&&i0(he,ve)}return s0(p,te,xe,ne,V,Ne.current,he)}}var e0=q.ReactCurrentOwner,n0=q.ReactDebugCurrentFrame;function N0(p){if(p){var I=p._owner,L=Ge(p.type,p._source,I?I.type:null);n0.setExtraStackFrame(L)}else n0.setExtraStackFrame(null)}var o0;o0=!1;function x0(p){return typeof p=="object"&&p!==null&&p.$$typeof===e}function D0(){{if(e0.current){var p=d(e0.current.type);if(p)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+p+"`."}return""}}function t0(p){return""}var Ve={};function rt(p){{var I=D0();if(!I){var L=typeof p=="string"?p:p.displayName||p.name;L&&(I=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+L+">.")}return I}}function c0(p,I){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var L=rt(I);if(Ve[L])return;Ve[L]=!0;var V="";p&&p._owner&&p._owner!==e0.current&&(V=" It was passed a child from "+d(p._owner.type)+"."),N0(p),F('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,V),N0(null)}}function d0(p,I){{if(typeof p!="object")return;if(Fe(p))for(var L=0;L<p.length;L++){var V=p[L];x0(V)&&c0(V,I)}else if(x0(p))p._store&&(p._store.validated=!0);else if(p){var ne=P(p);if(typeof ne=="function"&&ne!==p.entries)for(var fe=ne.call(p),he;!(he=fe.next()).done;)x0(he.value)&&c0(he.value,I)}}}function yt(p){{var I=p.type;if(I==null||typeof I=="string")return;var L;if(typeof I=="function")L=I.propTypes;else if(typeof I=="object"&&(I.$$typeof===u||I.$$typeof===v))L=I.propTypes;else return;if(L){var V=d(I);O0(L,p.props,"prop",V,p)}else if(I.PropTypes!==void 0&&!o0){o0=!0;var ne=d(I);F("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ne||"Unknown")}typeof I.getDefaultProps=="function"&&!I.getDefaultProps.isReactClassApproved&&F("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ie(p){{for(var I=Object.keys(p.props),L=0;L<I.length;L++){var V=I[L];if(V!=="children"&&V!=="key"){N0(p),F("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),N0(null);break}}p.ref!==null&&(N0(p),F("Invalid attribute `ref` supplied to `React.Fragment`."),N0(null))}}var Re={};function l(p,I,L,V,ne,fe){{var he=U(p);if(!he){var te="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(te+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var xe=t0();xe?te+=xe:te+=D0();var ue;p===null?ue="null":Fe(p)?ue="array":p!==void 0&&p.$$typeof===e?(ue="<"+(d(p.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof p,F("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,te)}var ve=W0(p,I,L,ne,fe);if(ve==null)return ve;if(he){var ge=I.children;if(ge!==void 0)if(V)if(Fe(ge)){for(var me=0;me<ge.length;me++)d0(ge[me],p);Object.freeze&&Object.freeze(ge)}else F("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d0(ge,p)}if(je.call(I,"key")){var _e=d(p),pe=Object.keys(I).filter(function(oe){return oe!=="key"}),de=pe.length>0?"{key: someKey, "+pe.join(": ..., ")+": ...}":"{key: someKey}";if(!Re[_e+de]){var ye=pe.length>0?"{"+pe.join(": ..., ")+": ...}":"{}";F(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,de,_e,ye,_e),Re[_e+de]=!0}}return p===r?Ie(ve):yt(ve),ve}}function _(p,I,L){return l(p,I,L,!0)}function m(p,I,L){return l(p,I,L,!1)}var s=m,M=_;Zt.Fragment=r,Zt.jsx=s,Zt.jsxs=M}()),Zt}process.env.NODE_ENV==="production"?Cf.exports=ca():Cf.exports=da();var vr=Cf.exports,ha=Object.defineProperty,br=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,ti=(f,e,t)=>e in f?ha(f,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):f[e]=t,ri=(f,e)=>{for(var t in e||(e={}))on.call(e,t)&&ti(f,t,e[t]);if(br)for(var t of br(e))cn.call(e,t)&&ti(f,t,e[t]);return f},ua=(f,e)=>{var t={};for(var r in f)on.call(f,r)&&e.indexOf(r)<0&&(t[r]=f[r]);if(f!=null&&br)for(var r of br(f))e.indexOf(r)<0&&cn.call(f,r)&&(t[r]=f[r]);return t};/**
|
|
31
31
|
* @license QR Code generator library (TypeScript)
|
|
32
32
|
* Copyright (c) Project Nayuki.
|
|
33
33
|
* SPDX-License-Identifier: MIT
|
|
34
|
-
*/var Zr;(i=>{const e=class{constructor(u,f,o,x){if(this.version=u,this.errorCorrectionLevel=f,this.modules=[],this.isFunction=[],u<e.MIN_VERSION||u>e.MAX_VERSION)throw new RangeError("Version value out of range");if(x<-1||x>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let v=[];for(let E=0;E<this.size;E++)v.push(!1);for(let E=0;E<this.size;E++)this.modules.push(v.slice()),this.isFunction.push(v.slice());this.drawFunctionPatterns();const _=this.addEccAndInterleave(o);if(this.drawCodewords(_),x==-1){let E=1e9;for(let D=0;D<8;D++){this.applyMask(D),this.drawFormatBits(D);const k=this.getPenaltyScore();k<E&&(x=D,E=k),this.applyMask(D)}}s(0<=x&&x<=7),this.mask=x,this.applyMask(x),this.drawFormatBits(x),this.isFunction=[]}static encodeText(u,f){const o=i.QrSegment.makeSegments(u);return e.encodeSegments(o,f)}static encodeBinary(u,f){const o=i.QrSegment.makeBytes(u);return e.encodeSegments([o],f)}static encodeSegments(u,f,o=1,x=40,v=-1,_=!0){if(!(e.MIN_VERSION<=o&&o<=x&&x<=e.MAX_VERSION)||v<-1||v>7)throw new RangeError("Invalid value");let E,D;for(E=o;;E++){const T=e.getNumDataCodewords(E,f)*8,z=p.getTotalBits(u,E);if(z<=T){D=z;break}if(E>=x)throw new RangeError("Data too long")}for(const T of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])_&&D<=e.getNumDataCodewords(E,T)*8&&(f=T);let k=[];for(const T of u){r(T.mode.modeBits,4,k),r(T.numChars,T.mode.numCharCountBits(E),k);for(const z of T.getData())k.push(z)}s(k.length==D);const H=e.getNumDataCodewords(E,f)*8;s(k.length<=H),r(0,Math.min(4,H-k.length),k),r(0,(8-k.length%8)%8,k),s(k.length%8==0);for(let T=236;k.length<H;T^=253)r(T,8,k);let P=[];for(;P.length*8<k.length;)P.push(0);return k.forEach((T,z)=>P[z>>>3]|=T<<7-(z&7)),new e(E,f,P,v)}getModule(u,f){return 0<=u&&u<this.size&&0<=f&&f<this.size&&this.modules[f][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2==0),this.setFunctionModule(o,6,o%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),f=u.length;for(let o=0;o<f;o++)for(let x=0;x<f;x++)o==0&&x==0||o==0&&x==f-1||o==f-1&&x==0||this.drawAlignmentPattern(u[o],u[x]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const f=this.errorCorrectionLevel.formatBits<<3|u;let o=f;for(let v=0;v<10;v++)o=o<<1^(o>>>9)*1335;const x=(f<<10|o)^21522;s(x>>>15==0);for(let v=0;v<=5;v++)this.setFunctionModule(8,v,a(x,v));this.setFunctionModule(8,7,a(x,6)),this.setFunctionModule(8,8,a(x,7)),this.setFunctionModule(7,8,a(x,8));for(let v=9;v<15;v++)this.setFunctionModule(14-v,8,a(x,v));for(let v=0;v<8;v++)this.setFunctionModule(this.size-1-v,8,a(x,v));for(let v=8;v<15;v++)this.setFunctionModule(8,this.size-15+v,a(x,v));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let o=0;o<12;o++)u=u<<1^(u>>>11)*7973;const f=this.version<<12|u;s(f>>>18==0);for(let o=0;o<18;o++){const x=a(f,o),v=this.size-11+o%3,_=Math.floor(o/3);this.setFunctionModule(v,_,x),this.setFunctionModule(_,v,x)}}drawFinderPattern(u,f){for(let o=-4;o<=4;o++)for(let x=-4;x<=4;x++){const v=Math.max(Math.abs(x),Math.abs(o)),_=u+x,E=f+o;0<=_&&_<this.size&&0<=E&&E<this.size&&this.setFunctionModule(_,E,v!=2&&v!=4)}}drawAlignmentPattern(u,f){for(let o=-2;o<=2;o++)for(let x=-2;x<=2;x++)this.setFunctionModule(u+x,f+o,Math.max(Math.abs(x),Math.abs(o))!=1)}setFunctionModule(u,f,o){this.modules[f][u]=o,this.isFunction[f][u]=!0}addEccAndInterleave(u){const f=this.version,o=this.errorCorrectionLevel;if(u.length!=e.getNumDataCodewords(f,o))throw new RangeError("Invalid argument");const x=e.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][f],v=e.ECC_CODEWORDS_PER_BLOCK[o.ordinal][f],_=Math.floor(e.getNumRawDataModules(f)/8),E=x-_%x,D=Math.floor(_/x);let k=[];const H=e.reedSolomonComputeDivisor(v);for(let T=0,z=0;T<x;T++){let V=u.slice(z,z+D-v+(T<E?0:1));z+=V.length;const Y=e.reedSolomonComputeRemainder(V,H);T<E&&V.push(0),k.push(V.concat(Y))}let P=[];for(let T=0;T<k[0].length;T++)k.forEach((z,V)=>{(T!=D-v||V>=E)&&P.push(z[T])});return s(P.length==_),P}drawCodewords(u){if(u.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let f=0;for(let o=this.size-1;o>=1;o-=2){o==6&&(o=5);for(let x=0;x<this.size;x++)for(let v=0;v<2;v++){const _=o-v,D=(o+1&2)==0?this.size-1-x:x;!this.isFunction[D][_]&&f<u.length*8&&(this.modules[D][_]=a(u[f>>>3],7-(f&7)),f++)}}s(f==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let f=0;f<this.size;f++)for(let o=0;o<this.size;o++){let x;switch(u){case 0:x=(o+f)%2==0;break;case 1:x=f%2==0;break;case 2:x=o%3==0;break;case 3:x=(o+f)%3==0;break;case 4:x=(Math.floor(o/3)+Math.floor(f/2))%2==0;break;case 5:x=o*f%2+o*f%3==0;break;case 6:x=(o*f%2+o*f%3)%2==0;break;case 7:x=((o+f)%2+o*f%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[f][o]&&x&&(this.modules[f][o]=!this.modules[f][o])}}getPenaltyScore(){let u=0;for(let v=0;v<this.size;v++){let _=!1,E=0,D=[0,0,0,0,0,0,0];for(let k=0;k<this.size;k++)this.modules[v][k]==_?(E++,E==5?u+=e.PENALTY_N1:E>5&&u++):(this.finderPenaltyAddHistory(E,D),_||(u+=this.finderPenaltyCountPatterns(D)*e.PENALTY_N3),_=this.modules[v][k],E=1);u+=this.finderPenaltyTerminateAndCount(_,E,D)*e.PENALTY_N3}for(let v=0;v<this.size;v++){let _=!1,E=0,D=[0,0,0,0,0,0,0];for(let k=0;k<this.size;k++)this.modules[k][v]==_?(E++,E==5?u+=e.PENALTY_N1:E>5&&u++):(this.finderPenaltyAddHistory(E,D),_||(u+=this.finderPenaltyCountPatterns(D)*e.PENALTY_N3),_=this.modules[k][v],E=1);u+=this.finderPenaltyTerminateAndCount(_,E,D)*e.PENALTY_N3}for(let v=0;v<this.size-1;v++)for(let _=0;_<this.size-1;_++){const E=this.modules[v][_];E==this.modules[v][_+1]&&E==this.modules[v+1][_]&&E==this.modules[v+1][_+1]&&(u+=e.PENALTY_N2)}let f=0;for(const v of this.modules)f=v.reduce((_,E)=>_+(E?1:0),f);const o=this.size*this.size,x=Math.ceil(Math.abs(f*20-o*10)/o)-1;return s(0<=x&&x<=9),u+=x*e.PENALTY_N4,s(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,f=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let o=[6];for(let x=this.size-7;o.length<u;x-=f)o.splice(1,0,x);return o}}static getNumRawDataModules(u){if(u<e.MIN_VERSION||u>e.MAX_VERSION)throw new RangeError("Version number out of range");let f=(16*u+128)*u+64;if(u>=2){const o=Math.floor(u/7)+2;f-=(25*o-10)*o-55,u>=7&&(f-=36)}return s(208<=f&&f<=29648),f}static getNumDataCodewords(u,f){return Math.floor(e.getNumRawDataModules(u)/8)-e.ECC_CODEWORDS_PER_BLOCK[f.ordinal][u]*e.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let f=[];for(let x=0;x<u-1;x++)f.push(0);f.push(1);let o=1;for(let x=0;x<u;x++){for(let v=0;v<f.length;v++)f[v]=e.reedSolomonMultiply(f[v],o),v+1<f.length&&(f[v]^=f[v+1]);o=e.reedSolomonMultiply(o,2)}return f}static reedSolomonComputeRemainder(u,f){let o=f.map(x=>0);for(const x of u){const v=x^o.shift();o.push(0),f.forEach((_,E)=>o[E]^=e.reedSolomonMultiply(_,v))}return o}static reedSolomonMultiply(u,f){if(u>>>8||f>>>8)throw new RangeError("Byte out of range");let o=0;for(let x=7;x>=0;x--)o=o<<1^(o>>>7)*285,o^=(f>>>x&1)*u;return s(o>>>8==0),o}finderPenaltyCountPatterns(u){const f=u[1];s(f<=this.size*3);const o=f>0&&u[2]==f&&u[3]==f*3&&u[4]==f&&u[5]==f;return(o&&u[0]>=f*4&&u[6]>=f?1:0)+(o&&u[6]>=f*4&&u[0]>=f?1:0)}finderPenaltyTerminateAndCount(u,f,o){return u&&(this.finderPenaltyAddHistory(f,o),f=0),f+=this.size,this.finderPenaltyAddHistory(f,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(u,f){f[0]==0&&(u+=this.size),f.pop(),f.unshift(u)}};let t=e;t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],i.QrCode=t;function r(u,f,o){if(f<0||f>31||u>>>f)throw new RangeError("Value out of range");for(let x=f-1;x>=0;x--)o.push(u>>>x&1)}function a(u,f){return(u>>>f&1)!=0}function s(u){if(!u)throw new Error("Assertion error")}const b=class{constructor(u,f,o){if(this.mode=u,this.numChars=f,this.bitData=o,f<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(u){let f=[];for(const o of u)r(o,8,f);return new b(b.Mode.BYTE,u.length,f)}static makeNumeric(u){if(!b.isNumeric(u))throw new RangeError("String contains non-numeric characters");let f=[];for(let o=0;o<u.length;){const x=Math.min(u.length-o,3);r(parseInt(u.substr(o,x),10),x*3+1,f),o+=x}return new b(b.Mode.NUMERIC,u.length,f)}static makeAlphanumeric(u){if(!b.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let f=[],o;for(o=0;o+2<=u.length;o+=2){let x=b.ALPHANUMERIC_CHARSET.indexOf(u.charAt(o))*45;x+=b.ALPHANUMERIC_CHARSET.indexOf(u.charAt(o+1)),r(x,11,f)}return o<u.length&&r(b.ALPHANUMERIC_CHARSET.indexOf(u.charAt(o)),6,f),new b(b.Mode.ALPHANUMERIC,u.length,f)}static makeSegments(u){return u==""?[]:b.isNumeric(u)?[b.makeNumeric(u)]:b.isAlphanumeric(u)?[b.makeAlphanumeric(u)]:[b.makeBytes(b.toUtf8ByteArray(u))]}static makeEci(u){let f=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)r(u,8,f);else if(u<16384)r(2,2,f),r(u,14,f);else if(u<1e6)r(6,3,f),r(u,21,f);else throw new RangeError("ECI assignment value out of range");return new b(b.Mode.ECI,0,f)}static isNumeric(u){return b.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return b.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,f){let o=0;for(const x of u){const v=x.mode.numCharCountBits(f);if(x.numChars>=1<<v)return 1/0;o+=4+v+x.bitData.length}return o}static toUtf8ByteArray(u){u=encodeURI(u);let f=[];for(let o=0;o<u.length;o++)u.charAt(o)!="%"?f.push(u.charCodeAt(o)):(f.push(parseInt(u.substr(o+1,2),16)),o+=2);return f}};let p=b;p.NUMERIC_REGEX=/^[0-9]*$/,p.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,p.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",i.QrSegment=p})(Zr||(Zr={}));(i=>{(e=>{const t=class{constructor(a,s){this.ordinal=a,this.formatBits=s}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(i.QrCode||(i.QrCode={}))})(Zr||(Zr={}));(i=>{(e=>{const t=class{constructor(a,s){this.modeBits=a,this.numBitsCharCount=s}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(i.QrSegment||(i.QrSegment={}))})(Zr||(Zr={}));var C0=Zr;/**
|
|
34
|
+
*/var Dt;(f=>{const e=class{constructor(u,o,c,v){if(this.version=u,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],u<e.MIN_VERSION||u>e.MAX_VERSION)throw new RangeError("Version value out of range");if(v<-1||v>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let b=[];for(let w=0;w<this.size;w++)b.push(!1);for(let w=0;w<this.size;w++)this.modules.push(b.slice()),this.isFunction.push(b.slice());this.drawFunctionPatterns();const C=this.addEccAndInterleave(c);if(this.drawCodewords(C),v==-1){let w=1e9;for(let R=0;R<8;R++){this.applyMask(R),this.drawFormatBits(R);const P=this.getPenaltyScore();P<w&&(v=R,w=P),this.applyMask(R)}}i(0<=v&&v<=7),this.mask=v,this.applyMask(v),this.drawFormatBits(v),this.isFunction=[]}static encodeText(u,o){const c=f.QrSegment.makeSegments(u);return e.encodeSegments(c,o)}static encodeBinary(u,o){const c=f.QrSegment.makeBytes(u);return e.encodeSegments([c],o)}static encodeSegments(u,o,c=1,v=40,b=-1,C=!0){if(!(e.MIN_VERSION<=c&&c<=v&&v<=e.MAX_VERSION)||b<-1||b>7)throw new RangeError("Invalid value");let w,R;for(w=c;;w++){const k=e.getNumDataCodewords(w,o)*8,T=x.getTotalBits(u,w);if(T<=k){R=T;break}if(w>=v)throw new RangeError("Data too long")}for(const k of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])C&&R<=e.getNumDataCodewords(w,k)*8&&(o=k);let P=[];for(const k of u){r(k.mode.modeBits,4,P),r(k.numChars,k.mode.numCharCountBits(w),P);for(const T of k.getData())P.push(T)}i(P.length==R);const q=e.getNumDataCodewords(w,o)*8;i(P.length<=q),r(0,Math.min(4,q-P.length),P),r(0,(8-P.length%8)%8,P),i(P.length%8==0);for(let k=236;P.length<q;k^=253)r(k,8,P);let F=[];for(;F.length*8<P.length;)F.push(0);return P.forEach((k,T)=>F[T>>>3]|=k<<7-(T&7)),new e(w,o,F,b)}getModule(u,o){return 0<=u&&u<this.size&&0<=o&&o<this.size&&this.modules[o][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),o=u.length;for(let c=0;c<o;c++)for(let v=0;v<o;v++)c==0&&v==0||c==0&&v==o-1||c==o-1&&v==0||this.drawAlignmentPattern(u[c],u[v]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const o=this.errorCorrectionLevel.formatBits<<3|u;let c=o;for(let b=0;b<10;b++)c=c<<1^(c>>>9)*1335;const v=(o<<10|c)^21522;i(v>>>15==0);for(let b=0;b<=5;b++)this.setFunctionModule(8,b,a(v,b));this.setFunctionModule(8,7,a(v,6)),this.setFunctionModule(8,8,a(v,7)),this.setFunctionModule(7,8,a(v,8));for(let b=9;b<15;b++)this.setFunctionModule(14-b,8,a(v,b));for(let b=0;b<8;b++)this.setFunctionModule(this.size-1-b,8,a(v,b));for(let b=8;b<15;b++)this.setFunctionModule(8,this.size-15+b,a(v,b));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let c=0;c<12;c++)u=u<<1^(u>>>11)*7973;const o=this.version<<12|u;i(o>>>18==0);for(let c=0;c<18;c++){const v=a(o,c),b=this.size-11+c%3,C=Math.floor(c/3);this.setFunctionModule(b,C,v),this.setFunctionModule(C,b,v)}}drawFinderPattern(u,o){for(let c=-4;c<=4;c++)for(let v=-4;v<=4;v++){const b=Math.max(Math.abs(v),Math.abs(c)),C=u+v,w=o+c;0<=C&&C<this.size&&0<=w&&w<this.size&&this.setFunctionModule(C,w,b!=2&&b!=4)}}drawAlignmentPattern(u,o){for(let c=-2;c<=2;c++)for(let v=-2;v<=2;v++)this.setFunctionModule(u+v,o+c,Math.max(Math.abs(v),Math.abs(c))!=1)}setFunctionModule(u,o,c){this.modules[o][u]=c,this.isFunction[o][u]=!0}addEccAndInterleave(u){const o=this.version,c=this.errorCorrectionLevel;if(u.length!=e.getNumDataCodewords(o,c))throw new RangeError("Invalid argument");const v=e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][o],b=e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][o],C=Math.floor(e.getNumRawDataModules(o)/8),w=v-C%v,R=Math.floor(C/v);let P=[];const q=e.reedSolomonComputeDivisor(b);for(let k=0,T=0;k<v;k++){let H=u.slice(T,T+R-b+(k<w?0:1));T+=H.length;const $=e.reedSolomonComputeRemainder(H,q);k<w&&H.push(0),P.push(H.concat($))}let F=[];for(let k=0;k<P[0].length;k++)P.forEach((T,H)=>{(k!=R-b||H>=w)&&F.push(T[k])});return i(F.length==C),F}drawCodewords(u){if(u.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let v=0;v<this.size;v++)for(let b=0;b<2;b++){const C=c-b,R=(c+1&2)==0?this.size-1-v:v;!this.isFunction[R][C]&&o<u.length*8&&(this.modules[R][C]=a(u[o>>>3],7-(o&7)),o++)}}i(o==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let o=0;o<this.size;o++)for(let c=0;c<this.size;c++){let v;switch(u){case 0:v=(c+o)%2==0;break;case 1:v=o%2==0;break;case 2:v=c%3==0;break;case 3:v=(c+o)%3==0;break;case 4:v=(Math.floor(c/3)+Math.floor(o/2))%2==0;break;case 5:v=c*o%2+c*o%3==0;break;case 6:v=(c*o%2+c*o%3)%2==0;break;case 7:v=((c+o)%2+c*o%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[o][c]&&v&&(this.modules[o][c]=!this.modules[o][c])}}getPenaltyScore(){let u=0;for(let b=0;b<this.size;b++){let C=!1,w=0,R=[0,0,0,0,0,0,0];for(let P=0;P<this.size;P++)this.modules[b][P]==C?(w++,w==5?u+=e.PENALTY_N1:w>5&&u++):(this.finderPenaltyAddHistory(w,R),C||(u+=this.finderPenaltyCountPatterns(R)*e.PENALTY_N3),C=this.modules[b][P],w=1);u+=this.finderPenaltyTerminateAndCount(C,w,R)*e.PENALTY_N3}for(let b=0;b<this.size;b++){let C=!1,w=0,R=[0,0,0,0,0,0,0];for(let P=0;P<this.size;P++)this.modules[P][b]==C?(w++,w==5?u+=e.PENALTY_N1:w>5&&u++):(this.finderPenaltyAddHistory(w,R),C||(u+=this.finderPenaltyCountPatterns(R)*e.PENALTY_N3),C=this.modules[P][b],w=1);u+=this.finderPenaltyTerminateAndCount(C,w,R)*e.PENALTY_N3}for(let b=0;b<this.size-1;b++)for(let C=0;C<this.size-1;C++){const w=this.modules[b][C];w==this.modules[b][C+1]&&w==this.modules[b+1][C]&&w==this.modules[b+1][C+1]&&(u+=e.PENALTY_N2)}let o=0;for(const b of this.modules)o=b.reduce((C,w)=>C+(w?1:0),o);const c=this.size*this.size,v=Math.ceil(Math.abs(o*20-c*10)/c)-1;return i(0<=v&&v<=9),u+=v*e.PENALTY_N4,i(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,o=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let c=[6];for(let v=this.size-7;c.length<u;v-=o)c.splice(1,0,v);return c}}static getNumRawDataModules(u){if(u<e.MIN_VERSION||u>e.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*u+128)*u+64;if(u>=2){const c=Math.floor(u/7)+2;o-=(25*c-10)*c-55,u>=7&&(o-=36)}return i(208<=o&&o<=29648),o}static getNumDataCodewords(u,o){return Math.floor(e.getNumRawDataModules(u)/8)-e.ECC_CODEWORDS_PER_BLOCK[o.ordinal][u]*e.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let o=[];for(let v=0;v<u-1;v++)o.push(0);o.push(1);let c=1;for(let v=0;v<u;v++){for(let b=0;b<o.length;b++)o[b]=e.reedSolomonMultiply(o[b],c),b+1<o.length&&(o[b]^=o[b+1]);c=e.reedSolomonMultiply(c,2)}return o}static reedSolomonComputeRemainder(u,o){let c=o.map(v=>0);for(const v of u){const b=v^c.shift();c.push(0),o.forEach((C,w)=>c[w]^=e.reedSolomonMultiply(C,b))}return c}static reedSolomonMultiply(u,o){if(u>>>8||o>>>8)throw new RangeError("Byte out of range");let c=0;for(let v=7;v>=0;v--)c=c<<1^(c>>>7)*285,c^=(o>>>v&1)*u;return i(c>>>8==0),c}finderPenaltyCountPatterns(u){const o=u[1];i(o<=this.size*3);const c=o>0&&u[2]==o&&u[3]==o*3&&u[4]==o&&u[5]==o;return(c&&u[0]>=o*4&&u[6]>=o?1:0)+(c&&u[6]>=o*4&&u[0]>=o?1:0)}finderPenaltyTerminateAndCount(u,o,c){return u&&(this.finderPenaltyAddHistory(o,c),o=0),o+=this.size,this.finderPenaltyAddHistory(o,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(u,o){o[0]==0&&(u+=this.size),o.pop(),o.unshift(u)}};let t=e;t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],f.QrCode=t;function r(u,o,c){if(o<0||o>31||u>>>o)throw new RangeError("Value out of range");for(let v=o-1;v>=0;v--)c.push(u>>>v&1)}function a(u,o){return(u>>>o&1)!=0}function i(u){if(!u)throw new Error("Assertion error")}const y=class{constructor(u,o,c){if(this.mode=u,this.numChars=o,this.bitData=c,o<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(u){let o=[];for(const c of u)r(c,8,o);return new y(y.Mode.BYTE,u.length,o)}static makeNumeric(u){if(!y.isNumeric(u))throw new RangeError("String contains non-numeric characters");let o=[];for(let c=0;c<u.length;){const v=Math.min(u.length-c,3);r(parseInt(u.substr(c,v),10),v*3+1,o),c+=v}return new y(y.Mode.NUMERIC,u.length,o)}static makeAlphanumeric(u){if(!y.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let o=[],c;for(c=0;c+2<=u.length;c+=2){let v=y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c))*45;v+=y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c+1)),r(v,11,o)}return c<u.length&&r(y.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c)),6,o),new y(y.Mode.ALPHANUMERIC,u.length,o)}static makeSegments(u){return u==""?[]:y.isNumeric(u)?[y.makeNumeric(u)]:y.isAlphanumeric(u)?[y.makeAlphanumeric(u)]:[y.makeBytes(y.toUtf8ByteArray(u))]}static makeEci(u){let o=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)r(u,8,o);else if(u<16384)r(2,2,o),r(u,14,o);else if(u<1e6)r(6,3,o),r(u,21,o);else throw new RangeError("ECI assignment value out of range");return new y(y.Mode.ECI,0,o)}static isNumeric(u){return y.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return y.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,o){let c=0;for(const v of u){const b=v.mode.numCharCountBits(o);if(v.numChars>=1<<b)return 1/0;c+=4+b+v.bitData.length}return c}static toUtf8ByteArray(u){u=encodeURI(u);let o=[];for(let c=0;c<u.length;c++)u.charAt(c)!="%"?o.push(u.charCodeAt(c)):(o.push(parseInt(u.substr(c+1,2),16)),c+=2);return o}};let x=y;x.NUMERIC_REGEX=/^[0-9]*$/,x.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,x.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",f.QrSegment=x})(Dt||(Dt={}));(f=>{(e=>{const t=class{constructor(a,i){this.ordinal=a,this.formatBits=i}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(f.QrCode||(f.QrCode={}))})(Dt||(Dt={}));(f=>{(e=>{const t=class{constructor(a,i){this.modeBits=a,this.numBitsCharCount=i}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(f.QrSegment||(f.QrSegment={}))})(Dt||(Dt={}));var rr=Dt;/**
|
|
35
35
|
* @license qrcode.react
|
|
36
36
|
* Copyright (c) Paul O'Shannessy
|
|
37
37
|
* SPDX-License-Identifier: ISC
|
|
38
|
-
*/var Sa={L:C0.QrCode.Ecc.LOW,M:C0.QrCode.Ecc.MEDIUM,Q:C0.QrCode.Ecc.QUARTILE,H:C0.QrCode.Ecc.HIGH},Fa=128,Ma="L",Da="#FFFFFF",Ra="#000000",Pa=!1,hs=4,Ta=.1;function ka(i,e=0){const t=[];return i.forEach(function(r,a){let s=null;r.forEach(function(b,p){if(!b&&s!==null){t.push(`M${s+e} ${a+e}h${p-s}v1H${s+e}z`),s=null;return}if(p===r.length-1){if(!b)return;s===null?t.push(`M${p+e},${a+e} h1v1H${p+e}z`):t.push(`M${s+e},${a+e} h${p+1-s}v1H${s+e}z`);return}b&&s===null&&(s=p)})}),t.join("")}function Oa(i,e){return i.slice().map((t,r)=>r<e.y||r>=e.y+e.h?t:t.map((a,s)=>s<e.x||s>=e.x+e.w?a:!1))}function Ia(i,e,t,r){if(r==null)return null;const a=t?hs:0,s=i.length+a*2,b=Math.floor(e*Ta),p=s/e,u=(r.width||b)*p,f=(r.height||b)*p,o=r.x==null?i.length/2-u/2:r.x*p,x=r.y==null?i.length/2-f/2:r.y*p;let v=null;if(r.excavate){let _=Math.floor(o),E=Math.floor(x),D=Math.ceil(u+o-_),k=Math.ceil(f+x-E);v={x:_,y:E,w:D,h:k}}return{x:o,y:x,h:f,w:u,excavation:v}}var Na=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function ls(i){const e=i,{value:t,size:r=Fa,level:a=Ma,bgColor:s=Da,fgColor:b=Ra,includeMargin:p=Pa,style:u,imageSettings:f}=e,o=Ca(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),x=f==null?void 0:f.src,v=br.useRef(null),_=br.useRef(null),[E,D]=br.useState(!1);br.useEffect(()=>{if(v.current!=null){const P=v.current,T=P.getContext("2d");if(!T)return;let z=C0.QrCode.encodeText(t,Sa[a]).getModules();const V=p?hs:0,Y=z.length+V*2,Z=Ia(z,r,p,f),fe=_.current,ae=Z!=null&&fe!==null&&fe.complete&&fe.naturalHeight!==0&&fe.naturalWidth!==0;ae&&Z.excavation!=null&&(z=Oa(z,Z.excavation));const X=window.devicePixelRatio||1;P.height=P.width=r*X;const S=r/Y*X;T.scale(S,S),T.fillStyle=s,T.fillRect(0,0,Y,Y),T.fillStyle=b,Na?T.fill(new Path2D(ka(z,V))):z.forEach(function(c,h){c.forEach(function(w,M){w&&T.fillRect(M+V,h+V,1,1)})}),ae&&T.drawImage(fe,Z.x+V,Z.y+V,Z.w,Z.h)}}),br.useEffect(()=>{D(!1)},[x]);const k=Zi({height:r,width:r},u);let H=null;return x!=null&&(H=B0.default.createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{D(!0)},ref:_})),B0.default.createElement(B0.default.Fragment,null,B0.default.createElement("canvas",Zi({style:k,height:r,width:r,ref:v},o)),H)}var xs={exports:{}},xn={exports:{}},Gi;function d0(){return Gi||(Gi=1,function(i,e){(function(t,r){i.exports=r()})(Ue,function(){var t=t||function(){return{}}();return t})}(xn)),xn.exports}var pn={exports:{}},Ji;function qa(){return Ji||(Ji=1,function(i,e){(function(t,r){i.exports=r(d0())})(Ue,function(t){return function(){var r=t;r.Util={time:function(){return Math.floor(Date.now()/1e3)},utime:function(){return Date.now()*1e3},uceiltime:function(){return Math.ceil(Date.now()/1e3)*1e6},randomHexString:function(a){let s="";for(let b=0;b<a*2;b++)s+=Math.floor(Math.random()*16).toString(16);return s},hexToByte:function(a){if(!a)return new Uint8Array;let s=[];for(let b=0,p=a.length;b<p;b+=2)s.push(parseInt(a.slice(b,b+2),16));return new Uint8Array(s)},byteToHex:function(a){return a?Array.prototype.map.call(a,function(s){return("0"+(s&255).toString(16)).slice(-2)}).join("").toLowerCase():""},stringToByte:function(a){let s=new Uint8Array(a.length);for(let b=0;b<a.length;b++)s[b]=a.charCodeAt(b);return s},stringToUnicode:function(a){return a?Array.prototype.map.call(a,function(s){let b=s.charCodeAt(0).toString(16);return b.length>2?"\\u"+b:s}).join(""):""},isIP:function(a){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:([0-9]{1,5}))?$/.test(a)},isHex:function(a){return typeof a!="string"?!1:/^[0-9a-fA-F]+$/.test(a)&&a.length%2===0},isInt:function(a){return typeof a!="number"&&typeof a!="string"?!1:Number.isInteger(Number(a))&&!/^0[0-9a-fA-F]+$/.test(a)},isNumeric:function(a){return typeof a!="number"&&typeof a!="string"?!1:!isNaN(Number(a))&&Number(a)!==1/0&&!/^0[0-9a-fA-F]+$/.test(n)},wrappedEndpoint:function(a){return a.startsWith("http://")||a.startsWith("https://")||a.startsWith("//")?a:this.isIP(a)?"http://"+a:"//"+a},string:function(a){let s;return typeof a=="object"&&a!==null?s=JSON.stringify(a):s=String(a),this.stringToUnicode(s.replace(/\//g,"\\/"))},shuffle:function(a){return a.map(s=>({v:s,i:Math.random()})).sort((s,b)=>s.i-b.i).map(({v:s})=>s)},merge:function(a,s){let b=a.concat(s);return[...new Set(b)]},flatMerge:function(a){let s=a.flat();return[...new Set(s)]},randomSlice:function(a,s){return this.shuffle(a).slice(0,s)}}}(),t.Util})}(pn)),pn.exports}var bn={exports:{}},ps={exports:{}};function bs(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vn={exports:{}};const za={},La=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),V0=os(La);var Qi;function bt(){return Qi||(Qi=1,function(i,e){(function(t,r){i.exports=r()})(Ue,function(){var t=t||function(r,a){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof Ue<"u"&&Ue.crypto&&(s=Ue.crypto),!s&&typeof bs=="function")try{s=V0}catch{}var b=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},p=Object.create||function(){function P(){}return function(T){var z;return P.prototype=T,z=new P,P.prototype=null,z}}(),u={},f=u.lib={},o=f.Base=function(){return{extend:function(P){var T=p(this);return P&&T.mixIn(P),(!T.hasOwnProperty("init")||this.init===T.init)&&(T.init=function(){T.$super.init.apply(this,arguments)}),T.init.prototype=T,T.$super=this,T},create:function(){var P=this.extend();return P.init.apply(P,arguments),P},init:function(){},mixIn:function(P){for(var T in P)P.hasOwnProperty(T)&&(this[T]=P[T]);P.hasOwnProperty("toString")&&(this.toString=P.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),x=f.WordArray=o.extend({init:function(P,T){P=this.words=P||[],T!=a?this.sigBytes=T:this.sigBytes=P.length*4},toString:function(P){return(P||_).stringify(this)},concat:function(P){var T=this.words,z=P.words,V=this.sigBytes,Y=P.sigBytes;if(this.clamp(),V%4)for(var Z=0;Z<Y;Z++){var fe=z[Z>>>2]>>>24-Z%4*8&255;T[V+Z>>>2]|=fe<<24-(V+Z)%4*8}else for(var ae=0;ae<Y;ae+=4)T[V+ae>>>2]=z[ae>>>2];return this.sigBytes+=Y,this},clamp:function(){var P=this.words,T=this.sigBytes;P[T>>>2]&=4294967295<<32-T%4*8,P.length=r.ceil(T/4)},clone:function(){var P=o.clone.call(this);return P.words=this.words.slice(0),P},random:function(P){for(var T=[],z=0;z<P;z+=4)T.push(b());return new x.init(T,P)}}),v=u.enc={},_=v.Hex={stringify:function(P){for(var T=P.words,z=P.sigBytes,V=[],Y=0;Y<z;Y++){var Z=T[Y>>>2]>>>24-Y%4*8&255;V.push((Z>>>4).toString(16)),V.push((Z&15).toString(16))}return V.join("")},parse:function(P){for(var T=P.length,z=[],V=0;V<T;V+=2)z[V>>>3]|=parseInt(P.substr(V,2),16)<<24-V%8*4;return new x.init(z,T/2)}},E=v.Latin1={stringify:function(P){for(var T=P.words,z=P.sigBytes,V=[],Y=0;Y<z;Y++){var Z=T[Y>>>2]>>>24-Y%4*8&255;V.push(String.fromCharCode(Z))}return V.join("")},parse:function(P){for(var T=P.length,z=[],V=0;V<T;V++)z[V>>>2]|=(P.charCodeAt(V)&255)<<24-V%4*8;return new x.init(z,T)}},D=v.Utf8={stringify:function(P){try{return decodeURIComponent(escape(E.stringify(P)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(P){return E.parse(unescape(encodeURIComponent(P)))}},k=f.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new x.init,this._nDataBytes=0},_append:function(P){typeof P=="string"&&(P=D.parse(P)),this._data.concat(P),this._nDataBytes+=P.sigBytes},_process:function(P){var T,z=this._data,V=z.words,Y=z.sigBytes,Z=this.blockSize,fe=Z*4,ae=Y/fe;P?ae=r.ceil(ae):ae=r.max((ae|0)-this._minBufferSize,0);var X=ae*Z,S=r.min(X*4,Y);if(X){for(var c=0;c<X;c+=Z)this._doProcessBlock(V,c);T=V.splice(0,X),z.sigBytes-=S}return new x.init(T,S)},clone:function(){var P=o.clone.call(this);return P._data=this._data.clone(),P},_minBufferSize:0});f.Hasher=k.extend({cfg:o.extend(),init:function(P){this.cfg=this.cfg.extend(P),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(P){return this._append(P),this._process(),this},finalize:function(P){P&&this._append(P);var T=this._doFinalize();return T},blockSize:16,_createHelper:function(P){return function(T,z){return new P.init(z).finalize(T)}},_createHmacHelper:function(P){return function(T,z){return new H.HMAC.init(P,z).finalize(T)}}});var H=u.algo={};return u}(Math);return t})}(vn)),vn.exports}var yn={exports:{}},ef;function Y0(){return ef||(ef=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(r){var a=t,s=a.lib,b=s.Base,p=s.WordArray,u=a.x64={};u.Word=b.extend({init:function(f,o){this.high=f,this.low=o}}),u.WordArray=b.extend({init:function(f,o){f=this.words=f||[],o!=r?this.sigBytes=o:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,o=f.length,x=[],v=0;v<o;v++){var _=f[v];x.push(_.high),x.push(_.low)}return p.create(x,this.sigBytes)},clone:function(){for(var f=b.clone.call(this),o=f.words=this.words.slice(0),x=o.length,v=0;v<x;v++)o[v]=o[v].clone();return f}})}(),t})}(yn)),yn.exports}var mn={exports:{}},tf;function Ha(){return tf||(tf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,a=r.lib,s=a.WordArray,b=s.init,p=s.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var f=u.byteLength,o=[],x=0;x<f;x++)o[x>>>2]|=u[x]<<24-x%4*8;b.call(this,o,f)}else b.apply(this,arguments)};p.prototype=s}}(),t.lib.WordArray})}(mn)),mn.exports}var gn={exports:{}},rf;function $a(){return rf||(rf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=r.enc;b.Utf16=b.Utf16BE={stringify:function(u){for(var f=u.words,o=u.sigBytes,x=[],v=0;v<o;v+=2){var _=f[v>>>2]>>>16-v%4*8&65535;x.push(String.fromCharCode(_))}return x.join("")},parse:function(u){for(var f=u.length,o=[],x=0;x<f;x++)o[x>>>1]|=u.charCodeAt(x)<<16-x%2*16;return s.create(o,f*2)}},b.Utf16LE={stringify:function(u){for(var f=u.words,o=u.sigBytes,x=[],v=0;v<o;v+=2){var _=p(f[v>>>2]>>>16-v%4*8&65535);x.push(String.fromCharCode(_))}return x.join("")},parse:function(u){for(var f=u.length,o=[],x=0;x<f;x++)o[x>>>1]|=p(u.charCodeAt(x)<<16-x%2*16);return s.create(o,f*2)}};function p(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(gn)),gn.exports}var _n={exports:{}},nf;function Jr(){return nf||(nf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=r.enc;b.Base64={stringify:function(u){var f=u.words,o=u.sigBytes,x=this._map;u.clamp();for(var v=[],_=0;_<o;_+=3)for(var E=f[_>>>2]>>>24-_%4*8&255,D=f[_+1>>>2]>>>24-(_+1)%4*8&255,k=f[_+2>>>2]>>>24-(_+2)%4*8&255,H=E<<16|D<<8|k,P=0;P<4&&_+P*.75<o;P++)v.push(x.charAt(H>>>6*(3-P)&63));var T=x.charAt(64);if(T)for(;v.length%4;)v.push(T);return v.join("")},parse:function(u){var f=u.length,o=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var v=0;v<o.length;v++)x[o.charCodeAt(v)]=v}var _=o.charAt(64);if(_){var E=u.indexOf(_);E!==-1&&(f=E)}return p(u,f,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function p(u,f,o){for(var x=[],v=0,_=0;_<f;_++)if(_%4){var E=o[u.charCodeAt(_-1)]<<_%4*2,D=o[u.charCodeAt(_)]>>>6-_%4*2,k=E|D;x[v>>>2]|=k<<24-v%4*8,v++}return s.create(x,v)}}(),t.enc.Base64})}(_n)),_n.exports}var En={exports:{}},ff;function Ua(){return ff||(ff=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=r.enc;b.Base64url={stringify:function(u,f){f===void 0&&(f=!0);var o=u.words,x=u.sigBytes,v=f?this._safe_map:this._map;u.clamp();for(var _=[],E=0;E<x;E+=3)for(var D=o[E>>>2]>>>24-E%4*8&255,k=o[E+1>>>2]>>>24-(E+1)%4*8&255,H=o[E+2>>>2]>>>24-(E+2)%4*8&255,P=D<<16|k<<8|H,T=0;T<4&&E+T*.75<x;T++)_.push(v.charAt(P>>>6*(3-T)&63));var z=v.charAt(64);if(z)for(;_.length%4;)_.push(z);return _.join("")},parse:function(u,f){f===void 0&&(f=!0);var o=u.length,x=f?this._safe_map:this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var _=0;_<x.length;_++)v[x.charCodeAt(_)]=_}var E=x.charAt(64);if(E){var D=u.indexOf(E);D!==-1&&(o=D)}return p(u,o,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function p(u,f,o){for(var x=[],v=0,_=0;_<f;_++)if(_%4){var E=o[u.charCodeAt(_-1)]<<_%4*2,D=o[u.charCodeAt(_)]>>>6-_%4*2,k=E|D;x[v>>>2]|=k<<24-v%4*8,v++}return s.create(x,v)}}(),t.enc.Base64url})}(En)),En.exports}var wn={exports:{}},sf;function Qr(){return sf||(sf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(r){var a=t,s=a.lib,b=s.WordArray,p=s.Hasher,u=a.algo,f=[];(function(){for(var D=0;D<64;D++)f[D]=r.abs(r.sin(D+1))*4294967296|0})();var o=u.MD5=p.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(D,k){for(var H=0;H<16;H++){var P=k+H,T=D[P];D[P]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}var z=this._hash.words,V=D[k+0],Y=D[k+1],Z=D[k+2],fe=D[k+3],ae=D[k+4],X=D[k+5],S=D[k+6],c=D[k+7],h=D[k+8],w=D[k+9],M=D[k+10],O=D[k+11],U=D[k+12],W=D[k+13],I=D[k+14],l=D[k+15],F=z[0],ee=z[1],J=z[2],G=z[3];F=x(F,ee,J,G,V,7,f[0]),G=x(G,F,ee,J,Y,12,f[1]),J=x(J,G,F,ee,Z,17,f[2]),ee=x(ee,J,G,F,fe,22,f[3]),F=x(F,ee,J,G,ae,7,f[4]),G=x(G,F,ee,J,X,12,f[5]),J=x(J,G,F,ee,S,17,f[6]),ee=x(ee,J,G,F,c,22,f[7]),F=x(F,ee,J,G,h,7,f[8]),G=x(G,F,ee,J,w,12,f[9]),J=x(J,G,F,ee,M,17,f[10]),ee=x(ee,J,G,F,O,22,f[11]),F=x(F,ee,J,G,U,7,f[12]),G=x(G,F,ee,J,W,12,f[13]),J=x(J,G,F,ee,I,17,f[14]),ee=x(ee,J,G,F,l,22,f[15]),F=v(F,ee,J,G,Y,5,f[16]),G=v(G,F,ee,J,S,9,f[17]),J=v(J,G,F,ee,O,14,f[18]),ee=v(ee,J,G,F,V,20,f[19]),F=v(F,ee,J,G,X,5,f[20]),G=v(G,F,ee,J,M,9,f[21]),J=v(J,G,F,ee,l,14,f[22]),ee=v(ee,J,G,F,ae,20,f[23]),F=v(F,ee,J,G,w,5,f[24]),G=v(G,F,ee,J,I,9,f[25]),J=v(J,G,F,ee,fe,14,f[26]),ee=v(ee,J,G,F,h,20,f[27]),F=v(F,ee,J,G,W,5,f[28]),G=v(G,F,ee,J,Z,9,f[29]),J=v(J,G,F,ee,c,14,f[30]),ee=v(ee,J,G,F,U,20,f[31]),F=_(F,ee,J,G,X,4,f[32]),G=_(G,F,ee,J,h,11,f[33]),J=_(J,G,F,ee,O,16,f[34]),ee=_(ee,J,G,F,I,23,f[35]),F=_(F,ee,J,G,Y,4,f[36]),G=_(G,F,ee,J,ae,11,f[37]),J=_(J,G,F,ee,c,16,f[38]),ee=_(ee,J,G,F,M,23,f[39]),F=_(F,ee,J,G,W,4,f[40]),G=_(G,F,ee,J,V,11,f[41]),J=_(J,G,F,ee,fe,16,f[42]),ee=_(ee,J,G,F,S,23,f[43]),F=_(F,ee,J,G,w,4,f[44]),G=_(G,F,ee,J,U,11,f[45]),J=_(J,G,F,ee,l,16,f[46]),ee=_(ee,J,G,F,Z,23,f[47]),F=E(F,ee,J,G,V,6,f[48]),G=E(G,F,ee,J,c,10,f[49]),J=E(J,G,F,ee,I,15,f[50]),ee=E(ee,J,G,F,X,21,f[51]),F=E(F,ee,J,G,U,6,f[52]),G=E(G,F,ee,J,fe,10,f[53]),J=E(J,G,F,ee,M,15,f[54]),ee=E(ee,J,G,F,Y,21,f[55]),F=E(F,ee,J,G,h,6,f[56]),G=E(G,F,ee,J,l,10,f[57]),J=E(J,G,F,ee,S,15,f[58]),ee=E(ee,J,G,F,W,21,f[59]),F=E(F,ee,J,G,ae,6,f[60]),G=E(G,F,ee,J,O,10,f[61]),J=E(J,G,F,ee,Z,15,f[62]),ee=E(ee,J,G,F,w,21,f[63]),z[0]=z[0]+F|0,z[1]=z[1]+ee|0,z[2]=z[2]+J|0,z[3]=z[3]+G|0},_doFinalize:function(){var D=this._data,k=D.words,H=this._nDataBytes*8,P=D.sigBytes*8;k[P>>>5]|=128<<24-P%32;var T=r.floor(H/4294967296),z=H;k[(P+64>>>9<<4)+15]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,k[(P+64>>>9<<4)+14]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360,D.sigBytes=(k.length+1)*4,this._process();for(var V=this._hash,Y=V.words,Z=0;Z<4;Z++){var fe=Y[Z];Y[Z]=(fe<<8|fe>>>24)&16711935|(fe<<24|fe>>>8)&4278255360}return V},clone:function(){var D=p.clone.call(this);return D._hash=this._hash.clone(),D}});function x(D,k,H,P,T,z,V){var Y=D+(k&H|~k&P)+T+V;return(Y<<z|Y>>>32-z)+k}function v(D,k,H,P,T,z,V){var Y=D+(k&P|H&~P)+T+V;return(Y<<z|Y>>>32-z)+k}function _(D,k,H,P,T,z,V){var Y=D+(k^H^P)+T+V;return(Y<<z|Y>>>32-z)+k}function E(D,k,H,P,T,z,V){var Y=D+(H^(k|~P))+T+V;return(Y<<z|Y>>>32-z)+k}a.MD5=p._createHelper(o),a.HmacMD5=p._createHmacHelper(o)}(Math),t.MD5})}(wn)),wn.exports}var An={exports:{}},af;function vs(){return af||(af=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=a.Hasher,p=r.algo,u=[],f=p.SHA1=b.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,x){for(var v=this._hash.words,_=v[0],E=v[1],D=v[2],k=v[3],H=v[4],P=0;P<80;P++){if(P<16)u[P]=o[x+P]|0;else{var T=u[P-3]^u[P-8]^u[P-14]^u[P-16];u[P]=T<<1|T>>>31}var z=(_<<5|_>>>27)+H+u[P];P<20?z+=(E&D|~E&k)+1518500249:P<40?z+=(E^D^k)+1859775393:P<60?z+=(E&D|E&k|D&k)-1894007588:z+=(E^D^k)-899497514,H=k,k=D,D=E<<30|E>>>2,E=_,_=z}v[0]=v[0]+_|0,v[1]=v[1]+E|0,v[2]=v[2]+D|0,v[3]=v[3]+k|0,v[4]=v[4]+H|0},_doFinalize:function(){var o=this._data,x=o.words,v=this._nDataBytes*8,_=o.sigBytes*8;return x[_>>>5]|=128<<24-_%32,x[(_+64>>>9<<4)+14]=Math.floor(v/4294967296),x[(_+64>>>9<<4)+15]=v,o.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var o=b.clone.call(this);return o._hash=this._hash.clone(),o}});r.SHA1=b._createHelper(f),r.HmacSHA1=b._createHmacHelper(f)}(),t.SHA1})}(An)),An.exports}var Bn={exports:{}},of;function Bi(){return of||(of=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){return function(r){var a=t,s=a.lib,b=s.WordArray,p=s.Hasher,u=a.algo,f=[],o=[];(function(){function _(H){for(var P=r.sqrt(H),T=2;T<=P;T++)if(!(H%T))return!1;return!0}function E(H){return(H-(H|0))*4294967296|0}for(var D=2,k=0;k<64;)_(D)&&(k<8&&(f[k]=E(r.pow(D,1/2))),o[k]=E(r.pow(D,1/3)),k++),D++})();var x=[],v=u.SHA256=p.extend({_doReset:function(){this._hash=new b.init(f.slice(0))},_doProcessBlock:function(_,E){for(var D=this._hash.words,k=D[0],H=D[1],P=D[2],T=D[3],z=D[4],V=D[5],Y=D[6],Z=D[7],fe=0;fe<64;fe++){if(fe<16)x[fe]=_[E+fe]|0;else{var ae=x[fe-15],X=(ae<<25|ae>>>7)^(ae<<14|ae>>>18)^ae>>>3,S=x[fe-2],c=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;x[fe]=X+x[fe-7]+c+x[fe-16]}var h=z&V^~z&Y,w=k&H^k&P^H&P,M=(k<<30|k>>>2)^(k<<19|k>>>13)^(k<<10|k>>>22),O=(z<<26|z>>>6)^(z<<21|z>>>11)^(z<<7|z>>>25),U=Z+O+h+o[fe]+x[fe],W=M+w;Z=Y,Y=V,V=z,z=T+U|0,T=P,P=H,H=k,k=U+W|0}D[0]=D[0]+k|0,D[1]=D[1]+H|0,D[2]=D[2]+P|0,D[3]=D[3]+T|0,D[4]=D[4]+z|0,D[5]=D[5]+V|0,D[6]=D[6]+Y|0,D[7]=D[7]+Z|0},_doFinalize:function(){var _=this._data,E=_.words,D=this._nDataBytes*8,k=_.sigBytes*8;return E[k>>>5]|=128<<24-k%32,E[(k+64>>>9<<4)+14]=r.floor(D/4294967296),E[(k+64>>>9<<4)+15]=D,_.sigBytes=E.length*4,this._process(),this._hash},clone:function(){var _=p.clone.call(this);return _._hash=this._hash.clone(),_}});a.SHA256=p._createHelper(v),a.HmacSHA256=p._createHmacHelper(v)}(Math),t.SHA256})}(Bn)),Bn.exports}var Cn={exports:{}},cf;function ja(){return cf||(cf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Bi())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=r.algo,p=b.SHA256,u=b.SHA224=p.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=p._doFinalize.call(this);return f.sigBytes-=4,f}});r.SHA224=p._createHelper(u),r.HmacSHA224=p._createHmacHelper(u)}(),t.SHA224})}(Cn)),Cn.exports}var Sn={exports:{}},df;function ys(){return df||(df=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Y0())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.Hasher,b=r.x64,p=b.Word,u=b.WordArray,f=r.algo;function o(){return p.create.apply(p,arguments)}var x=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],v=[];(function(){for(var E=0;E<80;E++)v[E]=o()})();var _=f.SHA512=s.extend({_doReset:function(){this._hash=new u.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(E,D){for(var k=this._hash.words,H=k[0],P=k[1],T=k[2],z=k[3],V=k[4],Y=k[5],Z=k[6],fe=k[7],ae=H.high,X=H.low,S=P.high,c=P.low,h=T.high,w=T.low,M=z.high,O=z.low,U=V.high,W=V.low,I=Y.high,l=Y.low,F=Z.high,ee=Z.low,J=fe.high,G=fe.low,he=ae,_e=X,Le=S,Ie=c,je=h,Ke=w,dr=M,at=O,Je=U,Nt=W,vt=I,rt=l,nr=F,dt=ee,Qe=J,Qt=G,et=0;et<80;et++){var Ve,Kt,re=v[et];if(et<16)Kt=re.high=E[D+et*2]|0,Ve=re.low=E[D+et*2+1]|0;else{var Ae=v[et-15],Ht=Ae.high,tt=Ae.low,Ft=(Ht>>>1|tt<<31)^(Ht>>>8|tt<<24)^Ht>>>7,sr=(tt>>>1|Ht<<31)^(tt>>>8|Ht<<24)^(tt>>>7|Ht<<25),At=v[et-2],nt=At.high,ir=At.low,Bt=(nt>>>19|ir<<13)^(nt<<3|ir>>>29)^nt>>>6,ot=(ir>>>19|nt<<13)^(ir<<3|nt>>>29)^(ir>>>6|nt<<26),er=v[et-7],yt=er.high,gt=er.low,ar=v[et-16],ut=ar.high,_t=ar.low;Ve=sr+gt,Kt=Ft+yt+(Ve>>>0<sr>>>0?1:0),Ve=Ve+ot,Kt=Kt+Bt+(Ve>>>0<ot>>>0?1:0),Ve=Ve+_t,Kt=Kt+ut+(Ve>>>0<_t>>>0?1:0),re.high=Kt,re.low=Ve}var tr=Je&vt^~Je&nr,Et=Nt&rt^~Nt&dt,Mt=he&Le^he&je^Le&je,Wt=_e&Ie^_e&Ke^Ie&Ke,mt=(he>>>28|_e<<4)^(he<<30|_e>>>2)^(he<<25|_e>>>7),ht=(_e>>>28|he<<4)^(_e<<30|he>>>2)^(_e<<25|he>>>7),ur=(Je>>>14|Nt<<18)^(Je>>>18|Nt<<14)^(Je<<23|Nt>>>9),Ct=(Nt>>>14|Je<<18)^(Nt>>>18|Je<<14)^(Nt<<23|Je>>>9),St=x[et],wr=St.high,Ze=St.low,qe=Qt+Ct,y=Qe+ur+(qe>>>0<Qt>>>0?1:0),qe=qe+Et,y=y+tr+(qe>>>0<Et>>>0?1:0),qe=qe+Ze,y=y+wr+(qe>>>0<Ze>>>0?1:0),qe=qe+Ve,y=y+Kt+(qe>>>0<Ve>>>0?1:0),C=ht+Wt,B=mt+Mt+(C>>>0<ht>>>0?1:0);Qe=nr,Qt=dt,nr=vt,dt=rt,vt=Je,rt=Nt,Nt=at+qe|0,Je=dr+y+(Nt>>>0<at>>>0?1:0)|0,dr=je,at=Ke,je=Le,Ke=Ie,Le=he,Ie=_e,_e=qe+C|0,he=y+B+(_e>>>0<qe>>>0?1:0)|0}X=H.low=X+_e,H.high=ae+he+(X>>>0<_e>>>0?1:0),c=P.low=c+Ie,P.high=S+Le+(c>>>0<Ie>>>0?1:0),w=T.low=w+Ke,T.high=h+je+(w>>>0<Ke>>>0?1:0),O=z.low=O+at,z.high=M+dr+(O>>>0<at>>>0?1:0),W=V.low=W+Nt,V.high=U+Je+(W>>>0<Nt>>>0?1:0),l=Y.low=l+rt,Y.high=I+vt+(l>>>0<rt>>>0?1:0),ee=Z.low=ee+dt,Z.high=F+nr+(ee>>>0<dt>>>0?1:0),G=fe.low=G+Qt,fe.high=J+Qe+(G>>>0<Qt>>>0?1:0)},_doFinalize:function(){var E=this._data,D=E.words,k=this._nDataBytes*8,H=E.sigBytes*8;D[H>>>5]|=128<<24-H%32,D[(H+128>>>10<<5)+30]=Math.floor(k/4294967296),D[(H+128>>>10<<5)+31]=k,E.sigBytes=D.length*4,this._process();var P=this._hash.toX32();return P},clone:function(){var E=s.clone.call(this);return E._hash=this._hash.clone(),E},blockSize:1024/32});r.SHA512=s._createHelper(_),r.HmacSHA512=s._createHmacHelper(_)}(),t.SHA512})}(Sn)),Sn.exports}var Fn={exports:{}},uf;function Wa(){return uf||(uf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Y0(),ys())})(Ue,function(t){return function(){var r=t,a=r.x64,s=a.Word,b=a.WordArray,p=r.algo,u=p.SHA512,f=p.SHA384=u.extend({_doReset:function(){this._hash=new b.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var o=u._doFinalize.call(this);return o.sigBytes-=16,o}});r.SHA384=u._createHelper(f),r.HmacSHA384=u._createHmacHelper(f)}(),t.SHA384})}(Fn)),Fn.exports}var Mn={exports:{}},hf;function Ka(){return hf||(hf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Y0())})(Ue,function(t){return function(r){var a=t,s=a.lib,b=s.WordArray,p=s.Hasher,u=a.x64,f=u.Word,o=a.algo,x=[],v=[],_=[];(function(){for(var k=1,H=0,P=0;P<24;P++){x[k+5*H]=(P+1)*(P+2)/2%64;var T=H%5,z=(2*k+3*H)%5;k=T,H=z}for(var k=0;k<5;k++)for(var H=0;H<5;H++)v[k+5*H]=H+(2*k+3*H)%5*5;for(var V=1,Y=0;Y<24;Y++){for(var Z=0,fe=0,ae=0;ae<7;ae++){if(V&1){var X=(1<<ae)-1;X<32?fe^=1<<X:Z^=1<<X-32}V&128?V=V<<1^113:V<<=1}_[Y]=f.create(Z,fe)}})();var E=[];(function(){for(var k=0;k<25;k++)E[k]=f.create()})();var D=o.SHA3=p.extend({cfg:p.cfg.extend({outputLength:512}),_doReset:function(){for(var k=this._state=[],H=0;H<25;H++)k[H]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(k,H){for(var P=this._state,T=this.blockSize/2,z=0;z<T;z++){var V=k[H+2*z],Y=k[H+2*z+1];V=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360,Y=(Y<<8|Y>>>24)&16711935|(Y<<24|Y>>>8)&4278255360;var Z=P[z];Z.high^=Y,Z.low^=V}for(var fe=0;fe<24;fe++){for(var ae=0;ae<5;ae++){for(var X=0,S=0,c=0;c<5;c++){var Z=P[ae+5*c];X^=Z.high,S^=Z.low}var h=E[ae];h.high=X,h.low=S}for(var ae=0;ae<5;ae++)for(var w=E[(ae+4)%5],M=E[(ae+1)%5],O=M.high,U=M.low,X=w.high^(O<<1|U>>>31),S=w.low^(U<<1|O>>>31),c=0;c<5;c++){var Z=P[ae+5*c];Z.high^=X,Z.low^=S}for(var W=1;W<25;W++){var X,S,Z=P[W],I=Z.high,l=Z.low,F=x[W];F<32?(X=I<<F|l>>>32-F,S=l<<F|I>>>32-F):(X=l<<F-32|I>>>64-F,S=I<<F-32|l>>>64-F);var ee=E[v[W]];ee.high=X,ee.low=S}var J=E[0],G=P[0];J.high=G.high,J.low=G.low;for(var ae=0;ae<5;ae++)for(var c=0;c<5;c++){var W=ae+5*c,Z=P[W],he=E[W],_e=E[(ae+1)%5+5*c],Le=E[(ae+2)%5+5*c];Z.high=he.high^~_e.high&Le.high,Z.low=he.low^~_e.low&Le.low}var Z=P[0],Ie=_[fe];Z.high^=Ie.high,Z.low^=Ie.low}},_doFinalize:function(){var k=this._data,H=k.words;this._nDataBytes*8;var P=k.sigBytes*8,T=this.blockSize*32;H[P>>>5]|=1<<24-P%32,H[(r.ceil((P+1)/T)*T>>>5)-1]|=128,k.sigBytes=H.length*4,this._process();for(var z=this._state,V=this.cfg.outputLength/8,Y=V/8,Z=[],fe=0;fe<Y;fe++){var ae=z[fe],X=ae.high,S=ae.low;X=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,Z.push(S),Z.push(X)}return new b.init(Z,V)},clone:function(){for(var k=p.clone.call(this),H=k._state=this._state.slice(0),P=0;P<25;P++)H[P]=H[P].clone();return k}});a.SHA3=p._createHelper(D),a.HmacSHA3=p._createHmacHelper(D)}(Math),t.SHA3})}(Mn)),Mn.exports}var Dn={exports:{}},lf;function Va(){return lf||(lf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){/** @preserve
|
|
38
|
+
*/var la={L:rr.QrCode.Ecc.LOW,M:rr.QrCode.Ecc.MEDIUM,Q:rr.QrCode.Ecc.QUARTILE,H:rr.QrCode.Ecc.HIGH},xa=128,va="L",ba="#FFFFFF",pa="#000000",ya=!1,dn=4,ga=.1;function ma(f,e=0){const t=[];return f.forEach(function(r,a){let i=null;r.forEach(function(y,x){if(!y&&i!==null){t.push(`M${i+e} ${a+e}h${x-i}v1H${i+e}z`),i=null;return}if(x===r.length-1){if(!y)return;i===null?t.push(`M${x+e},${a+e} h1v1H${x+e}z`):t.push(`M${i+e},${a+e} h${x+1-i}v1H${i+e}z`);return}y&&i===null&&(i=x)})}),t.join("")}function _a(f,e){return f.slice().map((t,r)=>r<e.y||r>=e.y+e.h?t:t.map((a,i)=>i<e.x||i>=e.x+e.w?a:!1))}function Aa(f,e,t,r){if(r==null)return null;const a=t?dn:0,i=f.length+a*2,y=Math.floor(e*ga),x=i/e,u=(r.width||y)*x,o=(r.height||y)*x,c=r.x==null?f.length/2-u/2:r.x*x,v=r.y==null?f.length/2-o/2:r.y*x;let b=null;if(r.excavate){let C=Math.floor(c),w=Math.floor(v),R=Math.ceil(u+c-C),P=Math.ceil(o+v-w);b={x:C,y:w,w:R,h:P}}return{x:c,y:v,h:o,w:u,excavation:b}}var Ea=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function hn(f){const e=f,{value:t,size:r=xa,level:a=va,bgColor:i=ba,fgColor:y=pa,includeMargin:x=ya,style:u,imageSettings:o}=e,c=ua(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),v=o==null?void 0:o.src,b=K0.useRef(null),C=K0.useRef(null),[w,R]=K0.useState(!1);K0.useEffect(()=>{if(b.current!=null){const F=b.current,k=F.getContext("2d");if(!k)return;let T=rr.QrCode.encodeText(t,la[a]).getModules();const H=x?dn:0,$=T.length+H*2,Y=Aa(T,r,x,o),X=C.current,Q=Y!=null&&X!==null&&X.complete&&X.naturalHeight!==0&&X.naturalWidth!==0;Q&&Y.excavation!=null&&(T=_a(T,Y.excavation));const U=window.devicePixelRatio||1;F.height=F.width=r*U;const A=r/$*U;k.scale(A,A),k.fillStyle=i,k.fillRect(0,0,$,$),k.fillStyle=y,Ea?k.fill(new Path2D(ma(T,H))):T.forEach(function(n,d){n.forEach(function(g,B){g&&k.fillRect(B+H,d+H,1,1)})}),Q&&k.drawImage(X,Y.x+H,Y.y+H,Y.w,Y.h)}}),K0.useEffect(()=>{R(!1)},[v]);const P=ri({height:r,width:r},u);let q=null;return v!=null&&(q=tr.default.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{R(!0)},ref:C})),tr.default.createElement(tr.default.Fragment,null,tr.default.createElement("canvas",ri({style:P,height:r,width:r,ref:b},c)),q)}var un={exports:{}};function ln(f){throw new Error('Could not dynamically require "'+f+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ir={exports:{}};const wa={},Ba=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),mr=an(Ba);var fi;function $e(){return fi||(fi=1,function(f,e){(function(t,r){f.exports=r()})(ke,function(){var t=t||function(r,a){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof ke<"u"&&ke.crypto&&(i=ke.crypto),!i&&typeof ln=="function")try{i=mr}catch{}var y=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},x=Object.create||function(){function F(){}return function(k){var T;return F.prototype=k,T=new F,F.prototype=null,T}}(),u={},o=u.lib={},c=o.Base=function(){return{extend:function(F){var k=x(this);return F&&k.mixIn(F),(!k.hasOwnProperty("init")||this.init===k.init)&&(k.init=function(){k.$super.init.apply(this,arguments)}),k.init.prototype=k,k.$super=this,k},create:function(){var F=this.extend();return F.init.apply(F,arguments),F},init:function(){},mixIn:function(F){for(var k in F)F.hasOwnProperty(k)&&(this[k]=F[k]);F.hasOwnProperty("toString")&&(this.toString=F.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=o.WordArray=c.extend({init:function(F,k){F=this.words=F||[],k!=a?this.sigBytes=k:this.sigBytes=F.length*4},toString:function(F){return(F||C).stringify(this)},concat:function(F){var k=this.words,T=F.words,H=this.sigBytes,$=F.sigBytes;if(this.clamp(),H%4)for(var Y=0;Y<$;Y++){var X=T[Y>>>2]>>>24-Y%4*8&255;k[H+Y>>>2]|=X<<24-(H+Y)%4*8}else for(var Q=0;Q<$;Q+=4)k[H+Q>>>2]=T[Q>>>2];return this.sigBytes+=$,this},clamp:function(){var F=this.words,k=this.sigBytes;F[k>>>2]&=4294967295<<32-k%4*8,F.length=r.ceil(k/4)},clone:function(){var F=c.clone.call(this);return F.words=this.words.slice(0),F},random:function(F){for(var k=[],T=0;T<F;T+=4)k.push(y());return new v.init(k,F)}}),b=u.enc={},C=b.Hex={stringify:function(F){for(var k=F.words,T=F.sigBytes,H=[],$=0;$<T;$++){var Y=k[$>>>2]>>>24-$%4*8&255;H.push((Y>>>4).toString(16)),H.push((Y&15).toString(16))}return H.join("")},parse:function(F){for(var k=F.length,T=[],H=0;H<k;H+=2)T[H>>>3]|=parseInt(F.substr(H,2),16)<<24-H%8*4;return new v.init(T,k/2)}},w=b.Latin1={stringify:function(F){for(var k=F.words,T=F.sigBytes,H=[],$=0;$<T;$++){var Y=k[$>>>2]>>>24-$%4*8&255;H.push(String.fromCharCode(Y))}return H.join("")},parse:function(F){for(var k=F.length,T=[],H=0;H<k;H++)T[H>>>2]|=(F.charCodeAt(H)&255)<<24-H%4*8;return new v.init(T,k)}},R=b.Utf8={stringify:function(F){try{return decodeURIComponent(escape(w.stringify(F)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(F){return w.parse(unescape(encodeURIComponent(F)))}},P=o.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(F){typeof F=="string"&&(F=R.parse(F)),this._data.concat(F),this._nDataBytes+=F.sigBytes},_process:function(F){var k,T=this._data,H=T.words,$=T.sigBytes,Y=this.blockSize,X=Y*4,Q=$/X;F?Q=r.ceil(Q):Q=r.max((Q|0)-this._minBufferSize,0);var U=Q*Y,A=r.min(U*4,$);if(U){for(var n=0;n<U;n+=Y)this._doProcessBlock(H,n);k=H.splice(0,U),T.sigBytes-=A}return new v.init(k,A)},clone:function(){var F=c.clone.call(this);return F._data=this._data.clone(),F},_minBufferSize:0});o.Hasher=P.extend({cfg:c.extend(),init:function(F){this.cfg=this.cfg.extend(F),this.reset()},reset:function(){P.reset.call(this),this._doReset()},update:function(F){return this._append(F),this._process(),this},finalize:function(F){F&&this._append(F);var k=this._doFinalize();return k},blockSize:16,_createHelper:function(F){return function(k,T){return new F.init(T).finalize(k)}},_createHmacHelper:function(F){return function(k,T){return new q.HMAC.init(F,T).finalize(k)}}});var q=u.algo={};return u}(Math);return t})}(Ir)),Ir.exports}var Tr={exports:{}},ii;function _r(){return ii||(ii=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(r){var a=t,i=a.lib,y=i.Base,x=i.WordArray,u=a.x64={};u.Word=y.extend({init:function(o,c){this.high=o,this.low=c}}),u.WordArray=y.extend({init:function(o,c){o=this.words=o||[],c!=r?this.sigBytes=c:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,c=o.length,v=[],b=0;b<c;b++){var C=o[b];v.push(C.high),v.push(C.low)}return x.create(v,this.sigBytes)},clone:function(){for(var o=y.clone.call(this),c=o.words=this.words.slice(0),v=c.length,b=0;b<v;b++)c[b]=c[b].clone();return o}})}(),t})}(Tr)),Tr.exports}var Or={exports:{}},ni;function Ca(){return ni||(ni=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,a=r.lib,i=a.WordArray,y=i.init,x=i.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var o=u.byteLength,c=[],v=0;v<o;v++)c[v>>>2]|=u[v]<<24-v%4*8;y.call(this,c,o)}else y.apply(this,arguments)};x.prototype=i}}(),t.lib.WordArray})}(Or)),Or.exports}var zr={exports:{}},ai;function Ma(){return ai||(ai=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=r.enc;y.Utf16=y.Utf16BE={stringify:function(u){for(var o=u.words,c=u.sigBytes,v=[],b=0;b<c;b+=2){var C=o[b>>>2]>>>16-b%4*8&65535;v.push(String.fromCharCode(C))}return v.join("")},parse:function(u){for(var o=u.length,c=[],v=0;v<o;v++)c[v>>>1]|=u.charCodeAt(v)<<16-v%2*16;return i.create(c,o*2)}},y.Utf16LE={stringify:function(u){for(var o=u.words,c=u.sigBytes,v=[],b=0;b<c;b+=2){var C=x(o[b>>>2]>>>16-b%4*8&65535);v.push(String.fromCharCode(C))}return v.join("")},parse:function(u){for(var o=u.length,c=[],v=0;v<o;v++)c[v>>>1]|=x(u.charCodeAt(v)<<16-v%2*16);return i.create(c,o*2)}};function x(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(zr)),zr.exports}var qr={exports:{}},si;function Pt(){return si||(si=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=r.enc;y.Base64={stringify:function(u){var o=u.words,c=u.sigBytes,v=this._map;u.clamp();for(var b=[],C=0;C<c;C+=3)for(var w=o[C>>>2]>>>24-C%4*8&255,R=o[C+1>>>2]>>>24-(C+1)%4*8&255,P=o[C+2>>>2]>>>24-(C+2)%4*8&255,q=w<<16|R<<8|P,F=0;F<4&&C+F*.75<c;F++)b.push(v.charAt(q>>>6*(3-F)&63));var k=v.charAt(64);if(k)for(;b.length%4;)b.push(k);return b.join("")},parse:function(u){var o=u.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var b=0;b<c.length;b++)v[c.charCodeAt(b)]=b}var C=c.charAt(64);if(C){var w=u.indexOf(C);w!==-1&&(o=w)}return x(u,o,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(u,o,c){for(var v=[],b=0,C=0;C<o;C++)if(C%4){var w=c[u.charCodeAt(C-1)]<<C%4*2,R=c[u.charCodeAt(C)]>>>6-C%4*2,P=w|R;v[b>>>2]|=P<<24-b%4*8,b++}return i.create(v,b)}}(),t.enc.Base64})}(qr)),qr.exports}var Nr={exports:{}},oi;function Sa(){return oi||(oi=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=r.enc;y.Base64url={stringify:function(u,o){o===void 0&&(o=!0);var c=u.words,v=u.sigBytes,b=o?this._safe_map:this._map;u.clamp();for(var C=[],w=0;w<v;w+=3)for(var R=c[w>>>2]>>>24-w%4*8&255,P=c[w+1>>>2]>>>24-(w+1)%4*8&255,q=c[w+2>>>2]>>>24-(w+2)%4*8&255,F=R<<16|P<<8|q,k=0;k<4&&w+k*.75<v;k++)C.push(b.charAt(F>>>6*(3-k)&63));var T=b.charAt(64);if(T)for(;C.length%4;)C.push(T);return C.join("")},parse:function(u,o){o===void 0&&(o=!0);var c=u.length,v=o?this._safe_map:this._map,b=this._reverseMap;if(!b){b=this._reverseMap=[];for(var C=0;C<v.length;C++)b[v.charCodeAt(C)]=C}var w=v.charAt(64);if(w){var R=u.indexOf(w);R!==-1&&(c=R)}return x(u,c,b)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(u,o,c){for(var v=[],b=0,C=0;C<o;C++)if(C%4){var w=c[u.charCodeAt(C-1)]<<C%4*2,R=c[u.charCodeAt(C)]>>>6-C%4*2,P=w|R;v[b>>>2]|=P<<24-b%4*8,b++}return i.create(v,b)}}(),t.enc.Base64url})}(Nr)),Nr.exports}var Lr={exports:{}},ci;function kt(){return ci||(ci=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(r){var a=t,i=a.lib,y=i.WordArray,x=i.Hasher,u=a.algo,o=[];(function(){for(var R=0;R<64;R++)o[R]=r.abs(r.sin(R+1))*4294967296|0})();var c=u.MD5=x.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(R,P){for(var q=0;q<16;q++){var F=P+q,k=R[F];R[F]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var T=this._hash.words,H=R[P+0],$=R[P+1],Y=R[P+2],X=R[P+3],Q=R[P+4],U=R[P+5],A=R[P+6],n=R[P+7],d=R[P+8],g=R[P+9],B=R[P+10],S=R[P+11],z=R[P+12],N=R[P+13],D=R[P+14],h=R[P+15],E=T[0],K=T[1],j=T[2],W=T[3];E=v(E,K,j,W,H,7,o[0]),W=v(W,E,K,j,$,12,o[1]),j=v(j,W,E,K,Y,17,o[2]),K=v(K,j,W,E,X,22,o[3]),E=v(E,K,j,W,Q,7,o[4]),W=v(W,E,K,j,U,12,o[5]),j=v(j,W,E,K,A,17,o[6]),K=v(K,j,W,E,n,22,o[7]),E=v(E,K,j,W,d,7,o[8]),W=v(W,E,K,j,g,12,o[9]),j=v(j,W,E,K,B,17,o[10]),K=v(K,j,W,E,S,22,o[11]),E=v(E,K,j,W,z,7,o[12]),W=v(W,E,K,j,N,12,o[13]),j=v(j,W,E,K,D,17,o[14]),K=v(K,j,W,E,h,22,o[15]),E=b(E,K,j,W,$,5,o[16]),W=b(W,E,K,j,A,9,o[17]),j=b(j,W,E,K,S,14,o[18]),K=b(K,j,W,E,H,20,o[19]),E=b(E,K,j,W,U,5,o[20]),W=b(W,E,K,j,B,9,o[21]),j=b(j,W,E,K,h,14,o[22]),K=b(K,j,W,E,Q,20,o[23]),E=b(E,K,j,W,g,5,o[24]),W=b(W,E,K,j,D,9,o[25]),j=b(j,W,E,K,X,14,o[26]),K=b(K,j,W,E,d,20,o[27]),E=b(E,K,j,W,N,5,o[28]),W=b(W,E,K,j,Y,9,o[29]),j=b(j,W,E,K,n,14,o[30]),K=b(K,j,W,E,z,20,o[31]),E=C(E,K,j,W,U,4,o[32]),W=C(W,E,K,j,d,11,o[33]),j=C(j,W,E,K,S,16,o[34]),K=C(K,j,W,E,D,23,o[35]),E=C(E,K,j,W,$,4,o[36]),W=C(W,E,K,j,Q,11,o[37]),j=C(j,W,E,K,n,16,o[38]),K=C(K,j,W,E,B,23,o[39]),E=C(E,K,j,W,N,4,o[40]),W=C(W,E,K,j,H,11,o[41]),j=C(j,W,E,K,X,16,o[42]),K=C(K,j,W,E,A,23,o[43]),E=C(E,K,j,W,g,4,o[44]),W=C(W,E,K,j,z,11,o[45]),j=C(j,W,E,K,h,16,o[46]),K=C(K,j,W,E,Y,23,o[47]),E=w(E,K,j,W,H,6,o[48]),W=w(W,E,K,j,n,10,o[49]),j=w(j,W,E,K,D,15,o[50]),K=w(K,j,W,E,U,21,o[51]),E=w(E,K,j,W,z,6,o[52]),W=w(W,E,K,j,X,10,o[53]),j=w(j,W,E,K,B,15,o[54]),K=w(K,j,W,E,$,21,o[55]),E=w(E,K,j,W,d,6,o[56]),W=w(W,E,K,j,h,10,o[57]),j=w(j,W,E,K,A,15,o[58]),K=w(K,j,W,E,N,21,o[59]),E=w(E,K,j,W,Q,6,o[60]),W=w(W,E,K,j,S,10,o[61]),j=w(j,W,E,K,Y,15,o[62]),K=w(K,j,W,E,g,21,o[63]),T[0]=T[0]+E|0,T[1]=T[1]+K|0,T[2]=T[2]+j|0,T[3]=T[3]+W|0},_doFinalize:function(){var R=this._data,P=R.words,q=this._nDataBytes*8,F=R.sigBytes*8;P[F>>>5]|=128<<24-F%32;var k=r.floor(q/4294967296),T=q;P[(F+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,P[(F+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,R.sigBytes=(P.length+1)*4,this._process();for(var H=this._hash,$=H.words,Y=0;Y<4;Y++){var X=$[Y];$[Y]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}return H},clone:function(){var R=x.clone.call(this);return R._hash=this._hash.clone(),R}});function v(R,P,q,F,k,T,H){var $=R+(P&q|~P&F)+k+H;return($<<T|$>>>32-T)+P}function b(R,P,q,F,k,T,H){var $=R+(P&F|q&~F)+k+H;return($<<T|$>>>32-T)+P}function C(R,P,q,F,k,T,H){var $=R+(P^q^F)+k+H;return($<<T|$>>>32-T)+P}function w(R,P,q,F,k,T,H){var $=R+(q^(P|~F))+k+H;return($<<T|$>>>32-T)+P}a.MD5=x._createHelper(c),a.HmacMD5=x._createHmacHelper(c)}(Math),t.MD5})}(Lr)),Lr.exports}var Hr={exports:{}},di;function xn(){return di||(di=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=a.Hasher,x=r.algo,u=[],o=x.SHA1=y.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var b=this._hash.words,C=b[0],w=b[1],R=b[2],P=b[3],q=b[4],F=0;F<80;F++){if(F<16)u[F]=c[v+F]|0;else{var k=u[F-3]^u[F-8]^u[F-14]^u[F-16];u[F]=k<<1|k>>>31}var T=(C<<5|C>>>27)+q+u[F];F<20?T+=(w&R|~w&P)+1518500249:F<40?T+=(w^R^P)+1859775393:F<60?T+=(w&R|w&P|R&P)-1894007588:T+=(w^R^P)-899497514,q=P,P=R,R=w<<30|w>>>2,w=C,C=T}b[0]=b[0]+C|0,b[1]=b[1]+w|0,b[2]=b[2]+R|0,b[3]=b[3]+P|0,b[4]=b[4]+q|0},_doFinalize:function(){var c=this._data,v=c.words,b=this._nDataBytes*8,C=c.sigBytes*8;return v[C>>>5]|=128<<24-C%32,v[(C+64>>>9<<4)+14]=Math.floor(b/4294967296),v[(C+64>>>9<<4)+15]=b,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=y.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=y._createHelper(o),r.HmacSHA1=y._createHmacHelper(o)}(),t.SHA1})}(Hr)),Hr.exports}var Ur={exports:{}},hi;function qf(){return hi||(hi=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){return function(r){var a=t,i=a.lib,y=i.WordArray,x=i.Hasher,u=a.algo,o=[],c=[];(function(){function C(q){for(var F=r.sqrt(q),k=2;k<=F;k++)if(!(q%k))return!1;return!0}function w(q){return(q-(q|0))*4294967296|0}for(var R=2,P=0;P<64;)C(R)&&(P<8&&(o[P]=w(r.pow(R,1/2))),c[P]=w(r.pow(R,1/3)),P++),R++})();var v=[],b=u.SHA256=x.extend({_doReset:function(){this._hash=new y.init(o.slice(0))},_doProcessBlock:function(C,w){for(var R=this._hash.words,P=R[0],q=R[1],F=R[2],k=R[3],T=R[4],H=R[5],$=R[6],Y=R[7],X=0;X<64;X++){if(X<16)v[X]=C[w+X]|0;else{var Q=v[X-15],U=(Q<<25|Q>>>7)^(Q<<14|Q>>>18)^Q>>>3,A=v[X-2],n=(A<<15|A>>>17)^(A<<13|A>>>19)^A>>>10;v[X]=U+v[X-7]+n+v[X-16]}var d=T&H^~T&$,g=P&q^P&F^q&F,B=(P<<30|P>>>2)^(P<<19|P>>>13)^(P<<10|P>>>22),S=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),z=Y+S+d+c[X]+v[X],N=B+g;Y=$,$=H,H=T,T=k+z|0,k=F,F=q,q=P,P=z+N|0}R[0]=R[0]+P|0,R[1]=R[1]+q|0,R[2]=R[2]+F|0,R[3]=R[3]+k|0,R[4]=R[4]+T|0,R[5]=R[5]+H|0,R[6]=R[6]+$|0,R[7]=R[7]+Y|0},_doFinalize:function(){var C=this._data,w=C.words,R=this._nDataBytes*8,P=C.sigBytes*8;return w[P>>>5]|=128<<24-P%32,w[(P+64>>>9<<4)+14]=r.floor(R/4294967296),w[(P+64>>>9<<4)+15]=R,C.sigBytes=w.length*4,this._process(),this._hash},clone:function(){var C=x.clone.call(this);return C._hash=this._hash.clone(),C}});a.SHA256=x._createHelper(b),a.HmacSHA256=x._createHmacHelper(b)}(Math),t.SHA256})}(Ur)),Ur.exports}var $r={exports:{}},ui;function Fa(){return ui||(ui=1,function(f,e){(function(t,r,a){f.exports=r($e(),qf())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=r.algo,x=y.SHA256,u=y.SHA224=x.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=x._doFinalize.call(this);return o.sigBytes-=4,o}});r.SHA224=x._createHelper(u),r.HmacSHA224=x._createHmacHelper(u)}(),t.SHA224})}($r)),$r.exports}var Wr={exports:{}},li;function vn(){return li||(li=1,function(f,e){(function(t,r,a){f.exports=r($e(),_r())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.Hasher,y=r.x64,x=y.Word,u=y.WordArray,o=r.algo;function c(){return x.create.apply(x,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],b=[];(function(){for(var w=0;w<80;w++)b[w]=c()})();var C=o.SHA512=i.extend({_doReset:function(){this._hash=new u.init([new x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(w,R){for(var P=this._hash.words,q=P[0],F=P[1],k=P[2],T=P[3],H=P[4],$=P[5],Y=P[6],X=P[7],Q=q.high,U=q.low,A=F.high,n=F.low,d=k.high,g=k.low,B=T.high,S=T.low,z=H.high,N=H.low,D=$.high,h=$.low,E=Y.high,K=Y.low,j=X.high,W=X.low,re=Q,ce=U,we=A,Ae=n,Me=d,Se=g,G0=B,We=S,Oe=z,_0=N,Ge=D,je=h,$0=E,Qe=K,ze=j,O0=W,qe=0;qe<80;qe++){var Fe,S0,Je=b[qe];if(qe<16)S0=Je.high=w[R+qe*2]|0,Fe=Je.low=w[R+qe*2+1]|0;else{var f0=b[qe-15],F0=f0.high,Ne=f0.low,u0=(F0>>>1|Ne<<31)^(F0>>>8|Ne<<24)^F0>>>7,Q0=(Ne>>>1|F0<<31)^(Ne>>>8|F0<<24)^(Ne>>>7|F0<<25),l0=b[qe-2],He=l0.high,z0=l0.low,a0=(He>>>19|z0<<13)^(He<<3|z0>>>29)^He>>>6,r0=(z0>>>19|He<<13)^(z0<<3|He>>>29)^(z0>>>6|He<<26),q0=b[qe-7],i0=q0.high,s0=q0.low,W0=b[qe-16],e0=W0.high,n0=W0.low;Fe=Q0+s0,S0=u0+i0+(Fe>>>0<Q0>>>0?1:0),Fe=Fe+r0,S0=S0+a0+(Fe>>>0<r0>>>0?1:0),Fe=Fe+n0,S0=S0+e0+(Fe>>>0<n0>>>0?1:0),Je.high=S0,Je.low=Fe}var N0=Oe&Ge^~Oe&$0,o0=_0&je^~_0&Qe,x0=re&we^re&Me^we&Me,D0=ce&Ae^ce&Se^Ae&Se,t0=(re>>>28|ce<<4)^(re<<30|ce>>>2)^(re<<25|ce>>>7),Ve=(ce>>>28|re<<4)^(ce<<30|re>>>2)^(ce<<25|re>>>7),rt=(Oe>>>14|_0<<18)^(Oe>>>18|_0<<14)^(Oe<<23|_0>>>9),c0=(_0>>>14|Oe<<18)^(_0>>>18|Oe<<14)^(_0<<23|Oe>>>9),d0=v[qe],yt=d0.high,Ie=d0.low,Re=O0+c0,l=ze+rt+(Re>>>0<O0>>>0?1:0),Re=Re+o0,l=l+N0+(Re>>>0<o0>>>0?1:0),Re=Re+Ie,l=l+yt+(Re>>>0<Ie>>>0?1:0),Re=Re+Fe,l=l+S0+(Re>>>0<Fe>>>0?1:0),_=Ve+D0,m=t0+x0+(_>>>0<Ve>>>0?1:0);ze=$0,O0=Qe,$0=Ge,Qe=je,Ge=Oe,je=_0,_0=We+Re|0,Oe=G0+l+(_0>>>0<We>>>0?1:0)|0,G0=Me,We=Se,Me=we,Se=Ae,we=re,Ae=ce,ce=Re+_|0,re=l+m+(ce>>>0<Re>>>0?1:0)|0}U=q.low=U+ce,q.high=Q+re+(U>>>0<ce>>>0?1:0),n=F.low=n+Ae,F.high=A+we+(n>>>0<Ae>>>0?1:0),g=k.low=g+Se,k.high=d+Me+(g>>>0<Se>>>0?1:0),S=T.low=S+We,T.high=B+G0+(S>>>0<We>>>0?1:0),N=H.low=N+_0,H.high=z+Oe+(N>>>0<_0>>>0?1:0),h=$.low=h+je,$.high=D+Ge+(h>>>0<je>>>0?1:0),K=Y.low=K+Qe,Y.high=E+$0+(K>>>0<Qe>>>0?1:0),W=X.low=W+O0,X.high=j+ze+(W>>>0<O0>>>0?1:0)},_doFinalize:function(){var w=this._data,R=w.words,P=this._nDataBytes*8,q=w.sigBytes*8;R[q>>>5]|=128<<24-q%32,R[(q+128>>>10<<5)+30]=Math.floor(P/4294967296),R[(q+128>>>10<<5)+31]=P,w.sigBytes=R.length*4,this._process();var F=this._hash.toX32();return F},clone:function(){var w=i.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:1024/32});r.SHA512=i._createHelper(C),r.HmacSHA512=i._createHmacHelper(C)}(),t.SHA512})}(Wr)),Wr.exports}var jr={exports:{}},xi;function Da(){return xi||(xi=1,function(f,e){(function(t,r,a){f.exports=r($e(),_r(),vn())})(ke,function(t){return function(){var r=t,a=r.x64,i=a.Word,y=a.WordArray,x=r.algo,u=x.SHA512,o=x.SHA384=u.extend({_doReset:function(){this._hash=new y.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var c=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(o),r.HmacSHA384=u._createHmacHelper(o)}(),t.SHA384})}(jr)),jr.exports}var Yr={exports:{}},vi;function Ra(){return vi||(vi=1,function(f,e){(function(t,r,a){f.exports=r($e(),_r())})(ke,function(t){return function(r){var a=t,i=a.lib,y=i.WordArray,x=i.Hasher,u=a.x64,o=u.Word,c=a.algo,v=[],b=[],C=[];(function(){for(var P=1,q=0,F=0;F<24;F++){v[P+5*q]=(F+1)*(F+2)/2%64;var k=q%5,T=(2*P+3*q)%5;P=k,q=T}for(var P=0;P<5;P++)for(var q=0;q<5;q++)b[P+5*q]=q+(2*P+3*q)%5*5;for(var H=1,$=0;$<24;$++){for(var Y=0,X=0,Q=0;Q<7;Q++){if(H&1){var U=(1<<Q)-1;U<32?X^=1<<U:Y^=1<<U-32}H&128?H=H<<1^113:H<<=1}C[$]=o.create(Y,X)}})();var w=[];(function(){for(var P=0;P<25;P++)w[P]=o.create()})();var R=c.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var P=this._state=[],q=0;q<25;q++)P[q]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(P,q){for(var F=this._state,k=this.blockSize/2,T=0;T<k;T++){var H=P[q+2*T],$=P[q+2*T+1];H=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,$=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360;var Y=F[T];Y.high^=$,Y.low^=H}for(var X=0;X<24;X++){for(var Q=0;Q<5;Q++){for(var U=0,A=0,n=0;n<5;n++){var Y=F[Q+5*n];U^=Y.high,A^=Y.low}var d=w[Q];d.high=U,d.low=A}for(var Q=0;Q<5;Q++)for(var g=w[(Q+4)%5],B=w[(Q+1)%5],S=B.high,z=B.low,U=g.high^(S<<1|z>>>31),A=g.low^(z<<1|S>>>31),n=0;n<5;n++){var Y=F[Q+5*n];Y.high^=U,Y.low^=A}for(var N=1;N<25;N++){var U,A,Y=F[N],D=Y.high,h=Y.low,E=v[N];E<32?(U=D<<E|h>>>32-E,A=h<<E|D>>>32-E):(U=h<<E-32|D>>>64-E,A=D<<E-32|h>>>64-E);var K=w[b[N]];K.high=U,K.low=A}var j=w[0],W=F[0];j.high=W.high,j.low=W.low;for(var Q=0;Q<5;Q++)for(var n=0;n<5;n++){var N=Q+5*n,Y=F[N],re=w[N],ce=w[(Q+1)%5+5*n],we=w[(Q+2)%5+5*n];Y.high=re.high^~ce.high&we.high,Y.low=re.low^~ce.low&we.low}var Y=F[0],Ae=C[X];Y.high^=Ae.high,Y.low^=Ae.low}},_doFinalize:function(){var P=this._data,q=P.words;this._nDataBytes*8;var F=P.sigBytes*8,k=this.blockSize*32;q[F>>>5]|=1<<24-F%32,q[(r.ceil((F+1)/k)*k>>>5)-1]|=128,P.sigBytes=q.length*4,this._process();for(var T=this._state,H=this.cfg.outputLength/8,$=H/8,Y=[],X=0;X<$;X++){var Q=T[X],U=Q.high,A=Q.low;U=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,Y.push(A),Y.push(U)}return new y.init(Y,H)},clone:function(){for(var P=x.clone.call(this),q=P._state=this._state.slice(0),F=0;F<25;F++)q[F]=q[F].clone();return P}});a.SHA3=x._createHelper(R),a.HmacSHA3=x._createHmacHelper(R)}(Math),t.SHA3})}(Yr)),Yr.exports}var Kr={exports:{}},bi;function Pa(){return bi||(bi=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){/** @preserve
|
|
39
39
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
40
40
|
|
|
41
41
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -44,13 +44,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
44
44
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
45
45
|
|
|
46
46
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
47
|
-
*/return function(r){var a=t,s=a.lib,b=s.WordArray,p=s.Hasher,u=a.algo,f=b.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=b.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),x=b.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=b.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),_=b.create([0,1518500249,1859775393,2400959708,2840853838]),E=b.create([1352829926,1548603684,1836072691,2053994217,0]),D=u.RIPEMD160=p.extend({_doReset:function(){this._hash=b.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Y,Z){for(var fe=0;fe<16;fe++){var ae=Z+fe,X=Y[ae];Y[ae]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}var S=this._hash.words,c=_.words,h=E.words,w=f.words,M=o.words,O=x.words,U=v.words,W,I,l,F,ee,J,G,he,_e,Le;J=W=S[0],G=I=S[1],he=l=S[2],_e=F=S[3],Le=ee=S[4];for(var Ie,fe=0;fe<80;fe+=1)Ie=W+Y[Z+w[fe]]|0,fe<16?Ie+=k(I,l,F)+c[0]:fe<32?Ie+=H(I,l,F)+c[1]:fe<48?Ie+=P(I,l,F)+c[2]:fe<64?Ie+=T(I,l,F)+c[3]:Ie+=z(I,l,F)+c[4],Ie=Ie|0,Ie=V(Ie,O[fe]),Ie=Ie+ee|0,W=ee,ee=F,F=V(l,10),l=I,I=Ie,Ie=J+Y[Z+M[fe]]|0,fe<16?Ie+=z(G,he,_e)+h[0]:fe<32?Ie+=T(G,he,_e)+h[1]:fe<48?Ie+=P(G,he,_e)+h[2]:fe<64?Ie+=H(G,he,_e)+h[3]:Ie+=k(G,he,_e)+h[4],Ie=Ie|0,Ie=V(Ie,U[fe]),Ie=Ie+Le|0,J=Le,Le=_e,_e=V(he,10),he=G,G=Ie;Ie=S[1]+l+_e|0,S[1]=S[2]+F+Le|0,S[2]=S[3]+ee+J|0,S[3]=S[4]+W+G|0,S[4]=S[0]+I+he|0,S[0]=Ie},_doFinalize:function(){var Y=this._data,Z=Y.words,fe=this._nDataBytes*8,ae=Y.sigBytes*8;Z[ae>>>5]|=128<<24-ae%32,Z[(ae+64>>>9<<4)+14]=(fe<<8|fe>>>24)&16711935|(fe<<24|fe>>>8)&4278255360,Y.sigBytes=(Z.length+1)*4,this._process();for(var X=this._hash,S=X.words,c=0;c<5;c++){var h=S[c];S[c]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}return X},clone:function(){var Y=p.clone.call(this);return Y._hash=this._hash.clone(),Y}});function k(Y,Z,fe){return Y^Z^fe}function H(Y,Z,fe){return Y&Z|~Y&fe}function P(Y,Z,fe){return(Y|~Z)^fe}function T(Y,Z,fe){return Y&fe|Z&~fe}function z(Y,Z,fe){return Y^(Z|~fe)}function V(Y,Z){return Y<<Z|Y>>>32-Z}a.RIPEMD160=p._createHelper(D),a.HmacRIPEMD160=p._createHmacHelper(D)}(),t.RIPEMD160})}(Dn)),Dn.exports}var Rn={exports:{}},xf;function Ci(){return xf||(xf=1,function(i,e){(function(t,r){i.exports=r(bt())})(Ue,function(t){(function(){var r=t,a=r.lib,s=a.Base,b=r.enc,p=b.Utf8,u=r.algo;u.HMAC=s.extend({init:function(f,o){f=this._hasher=new f.init,typeof o=="string"&&(o=p.parse(o));var x=f.blockSize,v=x*4;o.sigBytes>v&&(o=f.finalize(o)),o.clamp();for(var _=this._oKey=o.clone(),E=this._iKey=o.clone(),D=_.words,k=E.words,H=0;H<x;H++)D[H]^=1549556828,k[H]^=909522486;_.sigBytes=E.sigBytes=v,this.reset()},reset:function(){var f=this._hasher;f.reset(),f.update(this._iKey)},update:function(f){return this._hasher.update(f),this},finalize:function(f){var o=this._hasher,x=o.finalize(f);o.reset();var v=o.finalize(this._oKey.clone().concat(x));return v}})})()})}(Rn)),Rn.exports}var Pn={exports:{}},pf;function Ya(){return pf||(pf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Bi(),Ci())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.Base,b=a.WordArray,p=r.algo,u=p.SHA256,f=p.HMAC,o=p.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,v){for(var _=this.cfg,E=f.create(_.hasher,x),D=b.create(),k=b.create([1]),H=D.words,P=k.words,T=_.keySize,z=_.iterations;H.length<T;){var V=E.update(v).finalize(k);E.reset();for(var Y=V.words,Z=Y.length,fe=V,ae=1;ae<z;ae++){fe=E.finalize(fe),E.reset();for(var X=fe.words,S=0;S<Z;S++)Y[S]^=X[S]}D.concat(V),P[0]++}return D.sigBytes=T*4,D}});r.PBKDF2=function(x,v,_){return o.create(_).compute(x,v)}}(),t.PBKDF2})}(Pn)),Pn.exports}var Tn={exports:{}},bf;function jr(){return bf||(bf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),vs(),Ci())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.Base,b=a.WordArray,p=r.algo,u=p.MD5,f=p.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,x){for(var v,_=this.cfg,E=_.hasher.create(),D=b.create(),k=D.words,H=_.keySize,P=_.iterations;k.length<H;){v&&E.update(v),v=E.update(o).finalize(x),E.reset();for(var T=1;T<P;T++)v=E.finalize(v),E.reset();D.concat(v)}return D.sigBytes=H*4,D}});r.EvpKDF=function(o,x,v){return f.create(v).compute(o,x)}}(),t.EvpKDF})}(Tn)),Tn.exports}var kn={exports:{}},vf;function Gt(){return vf||(vf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),jr())})(Ue,function(t){t.lib.Cipher||function(r){var a=t,s=a.lib,b=s.Base,p=s.WordArray,u=s.BufferedBlockAlgorithm,f=a.enc;f.Utf8;var o=f.Base64,x=a.algo,v=x.EvpKDF,_=s.Cipher=u.extend({cfg:b.extend(),createEncryptor:function(X,S){return this.create(this._ENC_XFORM_MODE,X,S)},createDecryptor:function(X,S){return this.create(this._DEC_XFORM_MODE,X,S)},init:function(X,S,c){this.cfg=this.cfg.extend(c),this._xformMode=X,this._key=S,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(X){return this._append(X),this._process()},finalize:function(X){X&&this._append(X);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function X(S){return typeof S=="string"?ae:Y}return function(S){return{encrypt:function(c,h,w){return X(h).encrypt(S,c,h,w)},decrypt:function(c,h,w){return X(h).decrypt(S,c,h,w)}}}}()});s.StreamCipher=_.extend({_doFinalize:function(){var X=this._process(!0);return X},blockSize:1});var E=a.mode={},D=s.BlockCipherMode=b.extend({createEncryptor:function(X,S){return this.Encryptor.create(X,S)},createDecryptor:function(X,S){return this.Decryptor.create(X,S)},init:function(X,S){this._cipher=X,this._iv=S}}),k=E.CBC=function(){var X=D.extend();X.Encryptor=X.extend({processBlock:function(c,h){var w=this._cipher,M=w.blockSize;S.call(this,c,h,M),w.encryptBlock(c,h),this._prevBlock=c.slice(h,h+M)}}),X.Decryptor=X.extend({processBlock:function(c,h){var w=this._cipher,M=w.blockSize,O=c.slice(h,h+M);w.decryptBlock(c,h),S.call(this,c,h,M),this._prevBlock=O}});function S(c,h,w){var M,O=this._iv;O?(M=O,this._iv=r):M=this._prevBlock;for(var U=0;U<w;U++)c[h+U]^=M[U]}return X}(),H=a.pad={},P=H.Pkcs7={pad:function(X,S){for(var c=S*4,h=c-X.sigBytes%c,w=h<<24|h<<16|h<<8|h,M=[],O=0;O<h;O+=4)M.push(w);var U=p.create(M,h);X.concat(U)},unpad:function(X){var S=X.words[X.sigBytes-1>>>2]&255;X.sigBytes-=S}};s.BlockCipher=_.extend({cfg:_.cfg.extend({mode:k,padding:P}),reset:function(){var X;_.reset.call(this);var S=this.cfg,c=S.iv,h=S.mode;this._xformMode==this._ENC_XFORM_MODE?X=h.createEncryptor:(X=h.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==X?this._mode.init(this,c&&c.words):(this._mode=X.call(h,this,c&&c.words),this._mode.__creator=X)},_doProcessBlock:function(X,S){this._mode.processBlock(X,S)},_doFinalize:function(){var X,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),X=this._process(!0)):(X=this._process(!0),S.unpad(X)),X},blockSize:128/32});var T=s.CipherParams=b.extend({init:function(X){this.mixIn(X)},toString:function(X){return(X||this.formatter).stringify(this)}}),z=a.format={},V=z.OpenSSL={stringify:function(X){var S,c=X.ciphertext,h=X.salt;return h?S=p.create([1398893684,1701076831]).concat(h).concat(c):S=c,S.toString(o)},parse:function(X){var S,c=o.parse(X),h=c.words;return h[0]==1398893684&&h[1]==1701076831&&(S=p.create(h.slice(2,4)),h.splice(0,4),c.sigBytes-=16),T.create({ciphertext:c,salt:S})}},Y=s.SerializableCipher=b.extend({cfg:b.extend({format:V}),encrypt:function(X,S,c,h){h=this.cfg.extend(h);var w=X.createEncryptor(c,h),M=w.finalize(S),O=w.cfg;return T.create({ciphertext:M,key:c,iv:O.iv,algorithm:X,mode:O.mode,padding:O.padding,blockSize:X.blockSize,formatter:h.format})},decrypt:function(X,S,c,h){h=this.cfg.extend(h),S=this._parse(S,h.format);var w=X.createDecryptor(c,h).finalize(S.ciphertext);return w},_parse:function(X,S){return typeof X=="string"?S.parse(X,this):X}}),Z=a.kdf={},fe=Z.OpenSSL={execute:function(X,S,c,h,w){if(h||(h=p.random(64/8)),w)var M=v.create({keySize:S+c,hasher:w}).compute(X,h);else var M=v.create({keySize:S+c}).compute(X,h);var O=p.create(M.words.slice(S),c*4);return M.sigBytes=S*4,T.create({key:M,iv:O,salt:h})}},ae=s.PasswordBasedCipher=Y.extend({cfg:Y.cfg.extend({kdf:fe}),encrypt:function(X,S,c,h){h=this.cfg.extend(h);var w=h.kdf.execute(c,X.keySize,X.ivSize,h.salt,h.hasher);h.iv=w.iv;var M=Y.encrypt.call(this,X,S,w.key,h);return M.mixIn(w),M},decrypt:function(X,S,c,h){h=this.cfg.extend(h),S=this._parse(S,h.format);var w=h.kdf.execute(c,X.keySize,X.ivSize,S.salt,h.hasher);h.iv=w.iv;var M=Y.decrypt.call(this,X,S,w.key,h);return M}})}()})}(kn)),kn.exports}var On={exports:{}},yf;function Xa(){return yf||(yf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.mode.CFB=function(){var r=t.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,b){var p=this._cipher,u=p.blockSize;a.call(this,s,b,u,p),this._prevBlock=s.slice(b,b+u)}}),r.Decryptor=r.extend({processBlock:function(s,b){var p=this._cipher,u=p.blockSize,f=s.slice(b,b+u);a.call(this,s,b,u,p),this._prevBlock=f}});function a(s,b,p,u){var f,o=this._iv;o?(f=o.slice(0),this._iv=void 0):f=this._prevBlock,u.encryptBlock(f,0);for(var x=0;x<p;x++)s[b+x]^=f[x]}return r}(),t.mode.CFB})}(On)),On.exports}var In={exports:{}},mf;function Za(){return mf||(mf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(s,b){var p=this._cipher,u=p.blockSize,f=this._iv,o=this._counter;f&&(o=this._counter=f.slice(0),this._iv=void 0);var x=o.slice(0);p.encryptBlock(x,0),o[u-1]=o[u-1]+1|0;for(var v=0;v<u;v++)s[b+v]^=x[v]}});return r.Decryptor=a,r}(),t.mode.CTR})}(In)),In.exports}var Nn={exports:{}},gf;function Ga(){return gf||(gf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){/** @preserve
|
|
47
|
+
*/return function(r){var a=t,i=a.lib,y=i.WordArray,x=i.Hasher,u=a.algo,o=y.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=y.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=y.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),b=y.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),C=y.create([0,1518500249,1859775393,2400959708,2840853838]),w=y.create([1352829926,1548603684,1836072691,2053994217,0]),R=u.RIPEMD160=x.extend({_doReset:function(){this._hash=y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function($,Y){for(var X=0;X<16;X++){var Q=Y+X,U=$[Q];$[Q]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}var A=this._hash.words,n=C.words,d=w.words,g=o.words,B=c.words,S=v.words,z=b.words,N,D,h,E,K,j,W,re,ce,we;j=N=A[0],W=D=A[1],re=h=A[2],ce=E=A[3],we=K=A[4];for(var Ae,X=0;X<80;X+=1)Ae=N+$[Y+g[X]]|0,X<16?Ae+=P(D,h,E)+n[0]:X<32?Ae+=q(D,h,E)+n[1]:X<48?Ae+=F(D,h,E)+n[2]:X<64?Ae+=k(D,h,E)+n[3]:Ae+=T(D,h,E)+n[4],Ae=Ae|0,Ae=H(Ae,S[X]),Ae=Ae+K|0,N=K,K=E,E=H(h,10),h=D,D=Ae,Ae=j+$[Y+B[X]]|0,X<16?Ae+=T(W,re,ce)+d[0]:X<32?Ae+=k(W,re,ce)+d[1]:X<48?Ae+=F(W,re,ce)+d[2]:X<64?Ae+=q(W,re,ce)+d[3]:Ae+=P(W,re,ce)+d[4],Ae=Ae|0,Ae=H(Ae,z[X]),Ae=Ae+we|0,j=we,we=ce,ce=H(re,10),re=W,W=Ae;Ae=A[1]+h+ce|0,A[1]=A[2]+E+we|0,A[2]=A[3]+K+j|0,A[3]=A[4]+N+W|0,A[4]=A[0]+D+re|0,A[0]=Ae},_doFinalize:function(){var $=this._data,Y=$.words,X=this._nDataBytes*8,Q=$.sigBytes*8;Y[Q>>>5]|=128<<24-Q%32,Y[(Q+64>>>9<<4)+14]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360,$.sigBytes=(Y.length+1)*4,this._process();for(var U=this._hash,A=U.words,n=0;n<5;n++){var d=A[n];A[n]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return U},clone:function(){var $=x.clone.call(this);return $._hash=this._hash.clone(),$}});function P($,Y,X){return $^Y^X}function q($,Y,X){return $&Y|~$&X}function F($,Y,X){return($|~Y)^X}function k($,Y,X){return $&X|Y&~X}function T($,Y,X){return $^(Y|~X)}function H($,Y){return $<<Y|$>>>32-Y}a.RIPEMD160=x._createHelper(R),a.HmacRIPEMD160=x._createHmacHelper(R)}(),t.RIPEMD160})}(Kr)),Kr.exports}var Vr={exports:{}},pi;function Nf(){return pi||(pi=1,function(f,e){(function(t,r){f.exports=r($e())})(ke,function(t){(function(){var r=t,a=r.lib,i=a.Base,y=r.enc,x=y.Utf8,u=r.algo;u.HMAC=i.extend({init:function(o,c){o=this._hasher=new o.init,typeof c=="string"&&(c=x.parse(c));var v=o.blockSize,b=v*4;c.sigBytes>b&&(c=o.finalize(c)),c.clamp();for(var C=this._oKey=c.clone(),w=this._iKey=c.clone(),R=C.words,P=w.words,q=0;q<v;q++)R[q]^=1549556828,P[q]^=909522486;C.sigBytes=w.sigBytes=b,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var c=this._hasher,v=c.finalize(o);c.reset();var b=c.finalize(this._oKey.clone().concat(v));return b}})})()})}(Vr)),Vr.exports}var Xr={exports:{}},yi;function ka(){return yi||(yi=1,function(f,e){(function(t,r,a){f.exports=r($e(),qf(),Nf())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.Base,y=a.WordArray,x=r.algo,u=x.SHA256,o=x.HMAC,c=x.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,b){for(var C=this.cfg,w=o.create(C.hasher,v),R=y.create(),P=y.create([1]),q=R.words,F=P.words,k=C.keySize,T=C.iterations;q.length<k;){var H=w.update(b).finalize(P);w.reset();for(var $=H.words,Y=$.length,X=H,Q=1;Q<T;Q++){X=w.finalize(X),w.reset();for(var U=X.words,A=0;A<Y;A++)$[A]^=U[A]}R.concat(H),F[0]++}return R.sigBytes=k*4,R}});r.PBKDF2=function(v,b,C){return c.create(C).compute(v,b)}}(),t.PBKDF2})}(Xr)),Xr.exports}var Zr={exports:{}},gi;function At(){return gi||(gi=1,function(f,e){(function(t,r,a){f.exports=r($e(),xn(),Nf())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.Base,y=a.WordArray,x=r.algo,u=x.MD5,o=x.EvpKDF=i.extend({cfg:i.extend({keySize:128/32,hasher:u,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,v){for(var b,C=this.cfg,w=C.hasher.create(),R=y.create(),P=R.words,q=C.keySize,F=C.iterations;P.length<q;){b&&w.update(b),b=w.update(c).finalize(v),w.reset();for(var k=1;k<F;k++)b=w.finalize(b),w.reset();R.concat(b)}return R.sigBytes=q*4,R}});r.EvpKDF=function(c,v,b){return o.create(b).compute(c,v)}}(),t.EvpKDF})}(Zr)),Zr.exports}var Gr={exports:{}},mi;function C0(){return mi||(mi=1,function(f,e){(function(t,r,a){f.exports=r($e(),At())})(ke,function(t){t.lib.Cipher||function(r){var a=t,i=a.lib,y=i.Base,x=i.WordArray,u=i.BufferedBlockAlgorithm,o=a.enc;o.Utf8;var c=o.Base64,v=a.algo,b=v.EvpKDF,C=i.Cipher=u.extend({cfg:y.extend(),createEncryptor:function(U,A){return this.create(this._ENC_XFORM_MODE,U,A)},createDecryptor:function(U,A){return this.create(this._DEC_XFORM_MODE,U,A)},init:function(U,A,n){this.cfg=this.cfg.extend(n),this._xformMode=U,this._key=A,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(U){return this._append(U),this._process()},finalize:function(U){U&&this._append(U);var A=this._doFinalize();return A},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function U(A){return typeof A=="string"?Q:$}return function(A){return{encrypt:function(n,d,g){return U(d).encrypt(A,n,d,g)},decrypt:function(n,d,g){return U(d).decrypt(A,n,d,g)}}}}()});i.StreamCipher=C.extend({_doFinalize:function(){var U=this._process(!0);return U},blockSize:1});var w=a.mode={},R=i.BlockCipherMode=y.extend({createEncryptor:function(U,A){return this.Encryptor.create(U,A)},createDecryptor:function(U,A){return this.Decryptor.create(U,A)},init:function(U,A){this._cipher=U,this._iv=A}}),P=w.CBC=function(){var U=R.extend();U.Encryptor=U.extend({processBlock:function(n,d){var g=this._cipher,B=g.blockSize;A.call(this,n,d,B),g.encryptBlock(n,d),this._prevBlock=n.slice(d,d+B)}}),U.Decryptor=U.extend({processBlock:function(n,d){var g=this._cipher,B=g.blockSize,S=n.slice(d,d+B);g.decryptBlock(n,d),A.call(this,n,d,B),this._prevBlock=S}});function A(n,d,g){var B,S=this._iv;S?(B=S,this._iv=r):B=this._prevBlock;for(var z=0;z<g;z++)n[d+z]^=B[z]}return U}(),q=a.pad={},F=q.Pkcs7={pad:function(U,A){for(var n=A*4,d=n-U.sigBytes%n,g=d<<24|d<<16|d<<8|d,B=[],S=0;S<d;S+=4)B.push(g);var z=x.create(B,d);U.concat(z)},unpad:function(U){var A=U.words[U.sigBytes-1>>>2]&255;U.sigBytes-=A}};i.BlockCipher=C.extend({cfg:C.cfg.extend({mode:P,padding:F}),reset:function(){var U;C.reset.call(this);var A=this.cfg,n=A.iv,d=A.mode;this._xformMode==this._ENC_XFORM_MODE?U=d.createEncryptor:(U=d.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==U?this._mode.init(this,n&&n.words):(this._mode=U.call(d,this,n&&n.words),this._mode.__creator=U)},_doProcessBlock:function(U,A){this._mode.processBlock(U,A)},_doFinalize:function(){var U,A=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(A.pad(this._data,this.blockSize),U=this._process(!0)):(U=this._process(!0),A.unpad(U)),U},blockSize:128/32});var k=i.CipherParams=y.extend({init:function(U){this.mixIn(U)},toString:function(U){return(U||this.formatter).stringify(this)}}),T=a.format={},H=T.OpenSSL={stringify:function(U){var A,n=U.ciphertext,d=U.salt;return d?A=x.create([1398893684,1701076831]).concat(d).concat(n):A=n,A.toString(c)},parse:function(U){var A,n=c.parse(U),d=n.words;return d[0]==1398893684&&d[1]==1701076831&&(A=x.create(d.slice(2,4)),d.splice(0,4),n.sigBytes-=16),k.create({ciphertext:n,salt:A})}},$=i.SerializableCipher=y.extend({cfg:y.extend({format:H}),encrypt:function(U,A,n,d){d=this.cfg.extend(d);var g=U.createEncryptor(n,d),B=g.finalize(A),S=g.cfg;return k.create({ciphertext:B,key:n,iv:S.iv,algorithm:U,mode:S.mode,padding:S.padding,blockSize:U.blockSize,formatter:d.format})},decrypt:function(U,A,n,d){d=this.cfg.extend(d),A=this._parse(A,d.format);var g=U.createDecryptor(n,d).finalize(A.ciphertext);return g},_parse:function(U,A){return typeof U=="string"?A.parse(U,this):U}}),Y=a.kdf={},X=Y.OpenSSL={execute:function(U,A,n,d,g){if(d||(d=x.random(64/8)),g)var B=b.create({keySize:A+n,hasher:g}).compute(U,d);else var B=b.create({keySize:A+n}).compute(U,d);var S=x.create(B.words.slice(A),n*4);return B.sigBytes=A*4,k.create({key:B,iv:S,salt:d})}},Q=i.PasswordBasedCipher=$.extend({cfg:$.cfg.extend({kdf:X}),encrypt:function(U,A,n,d){d=this.cfg.extend(d);var g=d.kdf.execute(n,U.keySize,U.ivSize,d.salt,d.hasher);d.iv=g.iv;var B=$.encrypt.call(this,U,A,g.key,d);return B.mixIn(g),B},decrypt:function(U,A,n,d){d=this.cfg.extend(d),A=this._parse(A,d.format);var g=d.kdf.execute(n,U.keySize,U.ivSize,A.salt,d.hasher);d.iv=g.iv;var B=$.decrypt.call(this,U,A,g.key,d);return B}})}()})}(Gr)),Gr.exports}var Qr={exports:{}},_i;function Ia(){return _i||(_i=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.mode.CFB=function(){var r=t.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(i,y){var x=this._cipher,u=x.blockSize;a.call(this,i,y,u,x),this._prevBlock=i.slice(y,y+u)}}),r.Decryptor=r.extend({processBlock:function(i,y){var x=this._cipher,u=x.blockSize,o=i.slice(y,y+u);a.call(this,i,y,u,x),this._prevBlock=o}});function a(i,y,x,u){var o,c=this._iv;c?(o=c.slice(0),this._iv=void 0):o=this._prevBlock,u.encryptBlock(o,0);for(var v=0;v<x;v++)i[y+v]^=o[v]}return r}(),t.mode.CFB})}(Qr)),Qr.exports}var Jr={exports:{}},Ai;function Ta(){return Ai||(Ai=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(i,y){var x=this._cipher,u=x.blockSize,o=this._iv,c=this._counter;o&&(c=this._counter=o.slice(0),this._iv=void 0);var v=c.slice(0);x.encryptBlock(v,0),c[u-1]=c[u-1]+1|0;for(var b=0;b<u;b++)i[y+b]^=v[b]}});return r.Decryptor=a,r}(),t.mode.CTR})}(Jr)),Jr.exports}var ef={exports:{}},Ei;function Oa(){return Ei||(Ei=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){/** @preserve
|
|
48
48
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
49
49
|
* derived from CryptoJS.mode.CTR
|
|
50
50
|
* Jan Hruby jhruby.web@gmail.com
|
|
51
|
-
*/return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function a(p){if((p>>24&255)===255){var u=p>>16&255,f=p>>8&255,o=p&255;u===255?(u=0,f===255?(f=0,o===255?o=0:++o):++f):++u,p=0,p+=u<<16,p+=f<<8,p+=o}else p+=1<<24;return p}function s(p){return(p[0]=a(p[0]))===0&&(p[1]=a(p[1])),p}var b=r.Encryptor=r.extend({processBlock:function(p,u){var f=this._cipher,o=f.blockSize,x=this._iv,v=this._counter;x&&(v=this._counter=x.slice(0),this._iv=void 0),s(v);var _=v.slice(0);f.encryptBlock(_,0);for(var E=0;E<o;E++)p[u+E]^=_[E]}});return r.Decryptor=b,r}(),t.mode.CTRGladman})}(Nn)),Nn.exports}var qn={exports:{}},_f;function Ja(){return _f||(_f=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(s,b){var p=this._cipher,u=p.blockSize,f=this._iv,o=this._keystream;f&&(o=this._keystream=f.slice(0),this._iv=void 0),p.encryptBlock(o,0);for(var x=0;x<u;x++)s[b+x]^=o[x]}});return r.Decryptor=a,r}(),t.mode.OFB})}(qn)),qn.exports}var zn={exports:{}},Ef;function Qa(){return Ef||(Ef=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(a,s){this._cipher.encryptBlock(a,s)}}),r.Decryptor=r.extend({processBlock:function(a,s){this._cipher.decryptBlock(a,s)}}),r}(),t.mode.ECB})}(zn)),zn.exports}var Ln={exports:{}},wf;function eo(){return wf||(wf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.pad.AnsiX923={pad:function(r,a){var s=r.sigBytes,b=a*4,p=b-s%b,u=s+p-1;r.clamp(),r.words[u>>>2]|=p<<24-u%4*8,r.sigBytes+=p},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},t.pad.Ansix923})}(Ln)),Ln.exports}var Hn={exports:{}},Af;function to(){return Af||(Af=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.pad.Iso10126={pad:function(r,a){var s=a*4,b=s-r.sigBytes%s;r.concat(t.lib.WordArray.random(b-1)).concat(t.lib.WordArray.create([b<<24],1))},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},t.pad.Iso10126})}(Hn)),Hn.exports}var $n={exports:{}},Bf;function ro(){return Bf||(Bf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.pad.Iso97971={pad:function(r,a){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,a)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}($n)),$n.exports}var Un={exports:{}},Cf;function no(){return Cf||(Cf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.pad.ZeroPadding={pad:function(r,a){var s=a*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var a=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(a[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},t.pad.ZeroPadding})}(Un)),Un.exports}var jn={exports:{}},Sf;function io(){return Sf||(Sf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(jn)),jn.exports}var Wn={exports:{}},Ff;function fo(){return Ff||(Ff=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Gt())})(Ue,function(t){return function(r){var a=t,s=a.lib,b=s.CipherParams,p=a.enc,u=p.Hex,f=a.format;f.Hex={stringify:function(o){return o.ciphertext.toString(u)},parse:function(o){var x=u.parse(o);return b.create({ciphertext:x})}}}(),t.format.Hex})}(Wn)),Wn.exports}var Kn={exports:{}},Mf;function so(){return Mf||(Mf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.BlockCipher,b=r.algo,p=[],u=[],f=[],o=[],x=[],v=[],_=[],E=[],D=[],k=[];(function(){for(var T=[],z=0;z<256;z++)z<128?T[z]=z<<1:T[z]=z<<1^283;for(var V=0,Y=0,z=0;z<256;z++){var Z=Y^Y<<1^Y<<2^Y<<3^Y<<4;Z=Z>>>8^Z&255^99,p[V]=Z,u[Z]=V;var fe=T[V],ae=T[fe],X=T[ae],S=T[Z]*257^Z*16843008;f[V]=S<<24|S>>>8,o[V]=S<<16|S>>>16,x[V]=S<<8|S>>>24,v[V]=S;var S=X*16843009^ae*65537^fe*257^V*16843008;_[Z]=S<<24|S>>>8,E[Z]=S<<16|S>>>16,D[Z]=S<<8|S>>>24,k[Z]=S,V?(V=fe^T[T[T[X^fe]]],Y^=T[T[Y]]):V=Y=1}})();var H=[0,1,2,4,8,16,32,64,128,27,54],P=b.AES=s.extend({_doReset:function(){var T;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var z=this._keyPriorReset=this._key,V=z.words,Y=z.sigBytes/4,Z=this._nRounds=Y+6,fe=(Z+1)*4,ae=this._keySchedule=[],X=0;X<fe;X++)X<Y?ae[X]=V[X]:(T=ae[X-1],X%Y?Y>6&&X%Y==4&&(T=p[T>>>24]<<24|p[T>>>16&255]<<16|p[T>>>8&255]<<8|p[T&255]):(T=T<<8|T>>>24,T=p[T>>>24]<<24|p[T>>>16&255]<<16|p[T>>>8&255]<<8|p[T&255],T^=H[X/Y|0]<<24),ae[X]=ae[X-Y]^T);for(var S=this._invKeySchedule=[],c=0;c<fe;c++){var X=fe-c;if(c%4)var T=ae[X];else var T=ae[X-4];c<4||X<=4?S[c]=T:S[c]=_[p[T>>>24]]^E[p[T>>>16&255]]^D[p[T>>>8&255]]^k[p[T&255]]}}},encryptBlock:function(T,z){this._doCryptBlock(T,z,this._keySchedule,f,o,x,v,p)},decryptBlock:function(T,z){var V=T[z+1];T[z+1]=T[z+3],T[z+3]=V,this._doCryptBlock(T,z,this._invKeySchedule,_,E,D,k,u);var V=T[z+1];T[z+1]=T[z+3],T[z+3]=V},_doCryptBlock:function(T,z,V,Y,Z,fe,ae,X){for(var S=this._nRounds,c=T[z]^V[0],h=T[z+1]^V[1],w=T[z+2]^V[2],M=T[z+3]^V[3],O=4,U=1;U<S;U++){var W=Y[c>>>24]^Z[h>>>16&255]^fe[w>>>8&255]^ae[M&255]^V[O++],I=Y[h>>>24]^Z[w>>>16&255]^fe[M>>>8&255]^ae[c&255]^V[O++],l=Y[w>>>24]^Z[M>>>16&255]^fe[c>>>8&255]^ae[h&255]^V[O++],F=Y[M>>>24]^Z[c>>>16&255]^fe[h>>>8&255]^ae[w&255]^V[O++];c=W,h=I,w=l,M=F}var W=(X[c>>>24]<<24|X[h>>>16&255]<<16|X[w>>>8&255]<<8|X[M&255])^V[O++],I=(X[h>>>24]<<24|X[w>>>16&255]<<16|X[M>>>8&255]<<8|X[c&255])^V[O++],l=(X[w>>>24]<<24|X[M>>>16&255]<<16|X[c>>>8&255]<<8|X[h&255])^V[O++],F=(X[M>>>24]<<24|X[c>>>16&255]<<16|X[h>>>8&255]<<8|X[w&255])^V[O++];T[z]=W,T[z+1]=I,T[z+2]=l,T[z+3]=F},keySize:256/32});r.AES=s._createHelper(P)}(),t.AES})}(Kn)),Kn.exports}var Vn={exports:{}},Df;function ao(){return Df||(Df=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.WordArray,b=a.BlockCipher,p=r.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],f=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],x=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],v=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],_=p.DES=b.extend({_doReset:function(){for(var H=this._key,P=H.words,T=[],z=0;z<56;z++){var V=u[z]-1;T[z]=P[V>>>5]>>>31-V%32&1}for(var Y=this._subKeys=[],Z=0;Z<16;Z++){for(var fe=Y[Z]=[],ae=o[Z],z=0;z<24;z++)fe[z/6|0]|=T[(f[z]-1+ae)%28]<<31-z%6,fe[4+(z/6|0)]|=T[28+(f[z+24]-1+ae)%28]<<31-z%6;fe[0]=fe[0]<<1|fe[0]>>>31;for(var z=1;z<7;z++)fe[z]=fe[z]>>>(z-1)*4+3;fe[7]=fe[7]<<5|fe[7]>>>27}for(var X=this._invSubKeys=[],z=0;z<16;z++)X[z]=Y[15-z]},encryptBlock:function(H,P){this._doCryptBlock(H,P,this._subKeys)},decryptBlock:function(H,P){this._doCryptBlock(H,P,this._invSubKeys)},_doCryptBlock:function(H,P,T){this._lBlock=H[P],this._rBlock=H[P+1],E.call(this,4,252645135),E.call(this,16,65535),D.call(this,2,858993459),D.call(this,8,16711935),E.call(this,1,1431655765);for(var z=0;z<16;z++){for(var V=T[z],Y=this._lBlock,Z=this._rBlock,fe=0,ae=0;ae<8;ae++)fe|=x[ae][((Z^V[ae])&v[ae])>>>0];this._lBlock=Z,this._rBlock=Y^fe}var X=this._lBlock;this._lBlock=this._rBlock,this._rBlock=X,E.call(this,1,1431655765),D.call(this,8,16711935),D.call(this,2,858993459),E.call(this,16,65535),E.call(this,4,252645135),H[P]=this._lBlock,H[P+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function E(H,P){var T=(this._lBlock>>>H^this._rBlock)&P;this._rBlock^=T,this._lBlock^=T<<H}function D(H,P){var T=(this._rBlock>>>H^this._lBlock)&P;this._lBlock^=T,this._rBlock^=T<<H}r.DES=b._createHelper(_);var k=p.TripleDES=b.extend({_doReset:function(){var H=this._key,P=H.words;if(P.length!==2&&P.length!==4&&P.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var T=P.slice(0,2),z=P.length<4?P.slice(0,2):P.slice(2,4),V=P.length<6?P.slice(0,2):P.slice(4,6);this._des1=_.createEncryptor(s.create(T)),this._des2=_.createEncryptor(s.create(z)),this._des3=_.createEncryptor(s.create(V))},encryptBlock:function(H,P){this._des1.encryptBlock(H,P),this._des2.decryptBlock(H,P),this._des3.encryptBlock(H,P)},decryptBlock:function(H,P){this._des3.decryptBlock(H,P),this._des2.encryptBlock(H,P),this._des1.decryptBlock(H,P)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=b._createHelper(k)}(),t.TripleDES})}(Vn)),Vn.exports}var Yn={exports:{}},Rf;function oo(){return Rf||(Rf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.StreamCipher,b=r.algo,p=b.RC4=s.extend({_doReset:function(){for(var o=this._key,x=o.words,v=o.sigBytes,_=this._S=[],E=0;E<256;E++)_[E]=E;for(var E=0,D=0;E<256;E++){var k=E%v,H=x[k>>>2]>>>24-k%4*8&255;D=(D+_[E]+H)%256;var P=_[E];_[E]=_[D],_[D]=P}this._i=this._j=0},_doProcessBlock:function(o,x){o[x]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var o=this._S,x=this._i,v=this._j,_=0,E=0;E<4;E++){x=(x+1)%256,v=(v+o[x])%256;var D=o[x];o[x]=o[v],o[v]=D,_|=o[(o[x]+o[v])%256]<<24-E*8}return this._i=x,this._j=v,_}r.RC4=s._createHelper(p);var f=b.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)u.call(this)}});r.RC4Drop=s._createHelper(f)}(),t.RC4})}(Yn)),Yn.exports}var Xn={exports:{}},Pf;function co(){return Pf||(Pf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.StreamCipher,b=r.algo,p=[],u=[],f=[],o=b.Rabbit=s.extend({_doReset:function(){for(var v=this._key.words,_=this.cfg.iv,E=0;E<4;E++)v[E]=(v[E]<<8|v[E]>>>24)&16711935|(v[E]<<24|v[E]>>>8)&4278255360;var D=this._X=[v[0],v[3]<<16|v[2]>>>16,v[1],v[0]<<16|v[3]>>>16,v[2],v[1]<<16|v[0]>>>16,v[3],v[2]<<16|v[1]>>>16],k=this._C=[v[2]<<16|v[2]>>>16,v[0]&4294901760|v[1]&65535,v[3]<<16|v[3]>>>16,v[1]&4294901760|v[2]&65535,v[0]<<16|v[0]>>>16,v[2]&4294901760|v[3]&65535,v[1]<<16|v[1]>>>16,v[3]&4294901760|v[0]&65535];this._b=0;for(var E=0;E<4;E++)x.call(this);for(var E=0;E<8;E++)k[E]^=D[E+4&7];if(_){var H=_.words,P=H[0],T=H[1],z=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,V=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,Y=z>>>16|V&4294901760,Z=V<<16|z&65535;k[0]^=z,k[1]^=Y,k[2]^=V,k[3]^=Z,k[4]^=z,k[5]^=Y,k[6]^=V,k[7]^=Z;for(var E=0;E<4;E++)x.call(this)}},_doProcessBlock:function(v,_){var E=this._X;x.call(this),p[0]=E[0]^E[5]>>>16^E[3]<<16,p[1]=E[2]^E[7]>>>16^E[5]<<16,p[2]=E[4]^E[1]>>>16^E[7]<<16,p[3]=E[6]^E[3]>>>16^E[1]<<16;for(var D=0;D<4;D++)p[D]=(p[D]<<8|p[D]>>>24)&16711935|(p[D]<<24|p[D]>>>8)&4278255360,v[_+D]^=p[D]},blockSize:128/32,ivSize:64/32});function x(){for(var v=this._X,_=this._C,E=0;E<8;E++)u[E]=_[E];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<u[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<u[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<u[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<u[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<u[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<u[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<u[6]>>>0?1:0)|0,this._b=_[7]>>>0<u[7]>>>0?1:0;for(var E=0;E<8;E++){var D=v[E]+_[E],k=D&65535,H=D>>>16,P=((k*k>>>17)+k*H>>>15)+H*H,T=((D&4294901760)*D|0)+((D&65535)*D|0);f[E]=P^T}v[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,v[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,v[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,v[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,v[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,v[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,v[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,v[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}r.Rabbit=s._createHelper(o)}(),t.Rabbit})}(Xn)),Xn.exports}var Zn={exports:{}},Tf;function uo(){return Tf||(Tf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.StreamCipher,b=r.algo,p=[],u=[],f=[],o=b.RabbitLegacy=s.extend({_doReset:function(){var v=this._key.words,_=this.cfg.iv,E=this._X=[v[0],v[3]<<16|v[2]>>>16,v[1],v[0]<<16|v[3]>>>16,v[2],v[1]<<16|v[0]>>>16,v[3],v[2]<<16|v[1]>>>16],D=this._C=[v[2]<<16|v[2]>>>16,v[0]&4294901760|v[1]&65535,v[3]<<16|v[3]>>>16,v[1]&4294901760|v[2]&65535,v[0]<<16|v[0]>>>16,v[2]&4294901760|v[3]&65535,v[1]<<16|v[1]>>>16,v[3]&4294901760|v[0]&65535];this._b=0;for(var k=0;k<4;k++)x.call(this);for(var k=0;k<8;k++)D[k]^=E[k+4&7];if(_){var H=_.words,P=H[0],T=H[1],z=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,V=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,Y=z>>>16|V&4294901760,Z=V<<16|z&65535;D[0]^=z,D[1]^=Y,D[2]^=V,D[3]^=Z,D[4]^=z,D[5]^=Y,D[6]^=V,D[7]^=Z;for(var k=0;k<4;k++)x.call(this)}},_doProcessBlock:function(v,_){var E=this._X;x.call(this),p[0]=E[0]^E[5]>>>16^E[3]<<16,p[1]=E[2]^E[7]>>>16^E[5]<<16,p[2]=E[4]^E[1]>>>16^E[7]<<16,p[3]=E[6]^E[3]>>>16^E[1]<<16;for(var D=0;D<4;D++)p[D]=(p[D]<<8|p[D]>>>24)&16711935|(p[D]<<24|p[D]>>>8)&4278255360,v[_+D]^=p[D]},blockSize:128/32,ivSize:64/32});function x(){for(var v=this._X,_=this._C,E=0;E<8;E++)u[E]=_[E];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<u[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<u[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<u[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<u[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<u[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<u[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<u[6]>>>0?1:0)|0,this._b=_[7]>>>0<u[7]>>>0?1:0;for(var E=0;E<8;E++){var D=v[E]+_[E],k=D&65535,H=D>>>16,P=((k*k>>>17)+k*H>>>15)+H*H,T=((D&4294901760)*D|0)+((D&65535)*D|0);f[E]=P^T}v[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,v[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,v[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,v[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,v[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,v[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,v[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,v[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}r.RabbitLegacy=s._createHelper(o)}(),t.RabbitLegacy})}(Zn)),Zn.exports}var Gn={exports:{}},kf;function ho(){return kf||(kf=1,function(i,e){(function(t,r,a){i.exports=r(bt(),Jr(),Qr(),jr(),Gt())})(Ue,function(t){return function(){var r=t,a=r.lib,s=a.BlockCipher,b=r.algo;const p=16,u=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],f=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function x(k,H){let P=H>>24&255,T=H>>16&255,z=H>>8&255,V=H&255,Y=k.sbox[0][P]+k.sbox[1][T];return Y=Y^k.sbox[2][z],Y=Y+k.sbox[3][V],Y}function v(k,H,P){let T=H,z=P,V;for(let Y=0;Y<p;++Y)T=T^k.pbox[Y],z=x(k,T)^z,V=T,T=z,z=V;return V=T,T=z,z=V,z=z^k.pbox[p],T=T^k.pbox[p+1],{left:T,right:z}}function _(k,H,P){let T=H,z=P,V;for(let Y=p+1;Y>1;--Y)T=T^k.pbox[Y],z=x(k,T)^z,V=T,T=z,z=V;return V=T,T=z,z=V,z=z^k.pbox[1],T=T^k.pbox[0],{left:T,right:z}}function E(k,H,P){for(let Z=0;Z<4;Z++){k.sbox[Z]=[];for(let fe=0;fe<256;fe++)k.sbox[Z][fe]=f[Z][fe]}let T=0;for(let Z=0;Z<p+2;Z++)k.pbox[Z]=u[Z]^H[T],T++,T>=P&&(T=0);let z=0,V=0,Y=0;for(let Z=0;Z<p+2;Z+=2)Y=v(k,z,V),z=Y.left,V=Y.right,k.pbox[Z]=z,k.pbox[Z+1]=V;for(let Z=0;Z<4;Z++)for(let fe=0;fe<256;fe+=2)Y=v(k,z,V),z=Y.left,V=Y.right,k.sbox[Z][fe]=z,k.sbox[Z][fe+1]=V;return!0}var D=b.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var k=this._keyPriorReset=this._key,H=k.words,P=k.sigBytes/4;E(o,H,P)}},encryptBlock:function(k,H){var P=v(o,k[H],k[H+1]);k[H]=P.left,k[H+1]=P.right},decryptBlock:function(k,H){var P=_(o,k[H],k[H+1]);k[H]=P.left,k[H+1]=P.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(D)}(),t.Blowfish})}(Gn)),Gn.exports}(function(i,e){(function(t,r,a){i.exports=r(bt(),Y0(),Ha(),$a(),Jr(),Ua(),Qr(),vs(),Bi(),ja(),ys(),Wa(),Ka(),Va(),Ci(),Ya(),jr(),Gt(),Xa(),Za(),Ga(),Ja(),Qa(),eo(),to(),ro(),no(),io(),fo(),so(),ao(),oo(),co(),uo(),ho())})(Ue,function(t){return t})})(ps);var ms=ps.exports;const F0=as(ms);var Of;function lo(){return Of||(Of=1,function(i,e){(function(t,r){i.exports=r(d0(),ms)})(Ue,function(t,r){return function(){var a=t,s=a.Util;a.Enc={SHORT_HASH_SIZE:40,ID_HASH_SIZE:44,HASH_SIZE:64,HEX_TIME_SIZE:14,TIME_HASH_SIZE:78,ZERO_ADDRESS:"00000000000000000000000000000000000000000000",string:function(b){return s.string(b)},crypto:function(b,p){return r[b](p).toString(r.enc.Hex)},hash:function(b){return this.crypto("SHA256",this.string(b))},shortHash:function(b){return this.crypto("RIPEMD160",this.hash(b))},checksum:function(b){return this.hash(this.hash(b)).slice(0,4)},hextime:function(b){return typeof b!="number"&&(b=s.utime()),b.toString(16).padStart(this.HEX_TIME_SIZE,"0").slice(0,this.HEX_TIME_SIZE)},timeHash:function(b,p){return this.hextime(p)+this.hash(b)},timeHashValidity:function(b){return this.isHex(b)===!0&&b.length===this.TIME_HASH_SIZE},idHash:function(b){let p=this.shortHash(b);return p+this.checksum(p)},idHashValidity:function(b){return this.isHex(b)&&b.length===this.ID_HASH_SIZE&&this.checksum(b.slice(0,this.SHORT_HASH_SIZE))===b.slice(-4)},spaceId:function(b,p){return this.hash([b,p])},cid:function(b,p){return this.spaceId(b,p)},txHash:function(b){return this.timeHash(this.hash(b),b.timestamp)},isHex:function(b){return s.isHex(b)},parseCode:function(b){return typeof b=="string"&&(b=JSON.parse(b)),typeof b.w>"u"?{cid:t.Enc.spaceId(b.writer,b.nonce),name:b.name??"",writer:b.writer??"",type:b.type??"",version:b.version??"0",parameters:b.parameters??{},nonce:b.nonce??""}:{cid:t.Enc.spaceId(b.w,b.s),name:b.n??"",writer:b.w??"",type:b.t??"",version:b.v??"0",parameters:b.p??{},nonce:b.s??""}}}}(),t.Enc})}(bn)),bn.exports}var Jn={exports:{}},Qn={exports:{}},If;function xo(){return If||(If=1,function(i){(function(e){var t=function(y){var C,B=new Float64Array(16);if(y)for(C=0;C<y.length;C++)B[C]=y[C];return B},r=function(){throw new Error("no PRNG")},a=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var b=t(),p=t([1]),u=t([56129,1]),f=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),x=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),v=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),_=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function E(y,C,B,d){y[C]=B>>24&255,y[C+1]=B>>16&255,y[C+2]=B>>8&255,y[C+3]=B&255,y[C+4]=d>>24&255,y[C+5]=d>>16&255,y[C+6]=d>>8&255,y[C+7]=d&255}function D(y,C,B,d,R){var g,L=0;for(g=0;g<R;g++)L|=y[C+g]^B[d+g];return(1&L-1>>>8)-1}function k(y,C,B,d){return D(y,C,B,d,16)}function H(y,C,B,d){return D(y,C,B,d,32)}function P(y,C,B,d){for(var R=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,g=B[0]&255|(B[1]&255)<<8|(B[2]&255)<<16|(B[3]&255)<<24,L=B[4]&255|(B[5]&255)<<8|(B[6]&255)<<16|(B[7]&255)<<24,K=B[8]&255|(B[9]&255)<<8|(B[10]&255)<<16|(B[11]&255)<<24,ne=B[12]&255|(B[13]&255)<<8|(B[14]&255)<<16|(B[15]&255)<<24,pe=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,de=C[0]&255|(C[1]&255)<<8|(C[2]&255)<<16|(C[3]&255)<<24,ge=C[4]&255|(C[5]&255)<<8|(C[6]&255)<<16|(C[7]&255)<<24,ue=C[8]&255|(C[9]&255)<<8|(C[10]&255)<<16|(C[11]&255)<<24,Se=C[12]&255|(C[13]&255)<<8|(C[14]&255)<<16|(C[15]&255)<<24,Ee=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,Fe=B[16]&255|(B[17]&255)<<8|(B[18]&255)<<16|(B[19]&255)<<24,ke=B[20]&255|(B[21]&255)<<8|(B[22]&255)<<16|(B[23]&255)<<24,Oe=B[24]&255|(B[25]&255)<<8|(B[26]&255)<<16|(B[27]&255)<<24,Me=B[28]&255|(B[29]&255)<<8|(B[30]&255)<<16|(B[31]&255)<<24,De=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,we=R,Be=g,ye=L,Ce=K,Re=ne,me=pe,ie=de,se=ge,xe=ue,oe=Se,ce=Ee,be=Fe,Ne=ke,He=Oe,We=Me,Ye=De,$,Ge=0;Ge<20;Ge+=2)$=we+Ne|0,Re^=$<<7|$>>>25,$=Re+we|0,xe^=$<<9|$>>>23,$=xe+Re|0,Ne^=$<<13|$>>>19,$=Ne+xe|0,we^=$<<18|$>>>14,$=me+Be|0,oe^=$<<7|$>>>25,$=oe+me|0,He^=$<<9|$>>>23,$=He+oe|0,Be^=$<<13|$>>>19,$=Be+He|0,me^=$<<18|$>>>14,$=ce+ie|0,We^=$<<7|$>>>25,$=We+ce|0,ye^=$<<9|$>>>23,$=ye+We|0,ie^=$<<13|$>>>19,$=ie+ye|0,ce^=$<<18|$>>>14,$=Ye+be|0,Ce^=$<<7|$>>>25,$=Ce+Ye|0,se^=$<<9|$>>>23,$=se+Ce|0,be^=$<<13|$>>>19,$=be+se|0,Ye^=$<<18|$>>>14,$=we+Ce|0,Be^=$<<7|$>>>25,$=Be+we|0,ye^=$<<9|$>>>23,$=ye+Be|0,Ce^=$<<13|$>>>19,$=Ce+ye|0,we^=$<<18|$>>>14,$=me+Re|0,ie^=$<<7|$>>>25,$=ie+me|0,se^=$<<9|$>>>23,$=se+ie|0,Re^=$<<13|$>>>19,$=Re+se|0,me^=$<<18|$>>>14,$=ce+oe|0,be^=$<<7|$>>>25,$=be+ce|0,xe^=$<<9|$>>>23,$=xe+be|0,oe^=$<<13|$>>>19,$=oe+xe|0,ce^=$<<18|$>>>14,$=Ye+We|0,Ne^=$<<7|$>>>25,$=Ne+Ye|0,He^=$<<9|$>>>23,$=He+Ne|0,We^=$<<13|$>>>19,$=We+He|0,Ye^=$<<18|$>>>14;we=we+R|0,Be=Be+g|0,ye=ye+L|0,Ce=Ce+K|0,Re=Re+ne|0,me=me+pe|0,ie=ie+de|0,se=se+ge|0,xe=xe+ue|0,oe=oe+Se|0,ce=ce+Ee|0,be=be+Fe|0,Ne=Ne+ke|0,He=He+Oe|0,We=We+Me|0,Ye=Ye+De|0,y[0]=we>>>0&255,y[1]=we>>>8&255,y[2]=we>>>16&255,y[3]=we>>>24&255,y[4]=Be>>>0&255,y[5]=Be>>>8&255,y[6]=Be>>>16&255,y[7]=Be>>>24&255,y[8]=ye>>>0&255,y[9]=ye>>>8&255,y[10]=ye>>>16&255,y[11]=ye>>>24&255,y[12]=Ce>>>0&255,y[13]=Ce>>>8&255,y[14]=Ce>>>16&255,y[15]=Ce>>>24&255,y[16]=Re>>>0&255,y[17]=Re>>>8&255,y[18]=Re>>>16&255,y[19]=Re>>>24&255,y[20]=me>>>0&255,y[21]=me>>>8&255,y[22]=me>>>16&255,y[23]=me>>>24&255,y[24]=ie>>>0&255,y[25]=ie>>>8&255,y[26]=ie>>>16&255,y[27]=ie>>>24&255,y[28]=se>>>0&255,y[29]=se>>>8&255,y[30]=se>>>16&255,y[31]=se>>>24&255,y[32]=xe>>>0&255,y[33]=xe>>>8&255,y[34]=xe>>>16&255,y[35]=xe>>>24&255,y[36]=oe>>>0&255,y[37]=oe>>>8&255,y[38]=oe>>>16&255,y[39]=oe>>>24&255,y[40]=ce>>>0&255,y[41]=ce>>>8&255,y[42]=ce>>>16&255,y[43]=ce>>>24&255,y[44]=be>>>0&255,y[45]=be>>>8&255,y[46]=be>>>16&255,y[47]=be>>>24&255,y[48]=Ne>>>0&255,y[49]=Ne>>>8&255,y[50]=Ne>>>16&255,y[51]=Ne>>>24&255,y[52]=He>>>0&255,y[53]=He>>>8&255,y[54]=He>>>16&255,y[55]=He>>>24&255,y[56]=We>>>0&255,y[57]=We>>>8&255,y[58]=We>>>16&255,y[59]=We>>>24&255,y[60]=Ye>>>0&255,y[61]=Ye>>>8&255,y[62]=Ye>>>16&255,y[63]=Ye>>>24&255}function T(y,C,B,d){for(var R=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,g=B[0]&255|(B[1]&255)<<8|(B[2]&255)<<16|(B[3]&255)<<24,L=B[4]&255|(B[5]&255)<<8|(B[6]&255)<<16|(B[7]&255)<<24,K=B[8]&255|(B[9]&255)<<8|(B[10]&255)<<16|(B[11]&255)<<24,ne=B[12]&255|(B[13]&255)<<8|(B[14]&255)<<16|(B[15]&255)<<24,pe=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,de=C[0]&255|(C[1]&255)<<8|(C[2]&255)<<16|(C[3]&255)<<24,ge=C[4]&255|(C[5]&255)<<8|(C[6]&255)<<16|(C[7]&255)<<24,ue=C[8]&255|(C[9]&255)<<8|(C[10]&255)<<16|(C[11]&255)<<24,Se=C[12]&255|(C[13]&255)<<8|(C[14]&255)<<16|(C[15]&255)<<24,Ee=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,Fe=B[16]&255|(B[17]&255)<<8|(B[18]&255)<<16|(B[19]&255)<<24,ke=B[20]&255|(B[21]&255)<<8|(B[22]&255)<<16|(B[23]&255)<<24,Oe=B[24]&255|(B[25]&255)<<8|(B[26]&255)<<16|(B[27]&255)<<24,Me=B[28]&255|(B[29]&255)<<8|(B[30]&255)<<16|(B[31]&255)<<24,De=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,we=R,Be=g,ye=L,Ce=K,Re=ne,me=pe,ie=de,se=ge,xe=ue,oe=Se,ce=Ee,be=Fe,Ne=ke,He=Oe,We=Me,Ye=De,$,Ge=0;Ge<20;Ge+=2)$=we+Ne|0,Re^=$<<7|$>>>25,$=Re+we|0,xe^=$<<9|$>>>23,$=xe+Re|0,Ne^=$<<13|$>>>19,$=Ne+xe|0,we^=$<<18|$>>>14,$=me+Be|0,oe^=$<<7|$>>>25,$=oe+me|0,He^=$<<9|$>>>23,$=He+oe|0,Be^=$<<13|$>>>19,$=Be+He|0,me^=$<<18|$>>>14,$=ce+ie|0,We^=$<<7|$>>>25,$=We+ce|0,ye^=$<<9|$>>>23,$=ye+We|0,ie^=$<<13|$>>>19,$=ie+ye|0,ce^=$<<18|$>>>14,$=Ye+be|0,Ce^=$<<7|$>>>25,$=Ce+Ye|0,se^=$<<9|$>>>23,$=se+Ce|0,be^=$<<13|$>>>19,$=be+se|0,Ye^=$<<18|$>>>14,$=we+Ce|0,Be^=$<<7|$>>>25,$=Be+we|0,ye^=$<<9|$>>>23,$=ye+Be|0,Ce^=$<<13|$>>>19,$=Ce+ye|0,we^=$<<18|$>>>14,$=me+Re|0,ie^=$<<7|$>>>25,$=ie+me|0,se^=$<<9|$>>>23,$=se+ie|0,Re^=$<<13|$>>>19,$=Re+se|0,me^=$<<18|$>>>14,$=ce+oe|0,be^=$<<7|$>>>25,$=be+ce|0,xe^=$<<9|$>>>23,$=xe+be|0,oe^=$<<13|$>>>19,$=oe+xe|0,ce^=$<<18|$>>>14,$=Ye+We|0,Ne^=$<<7|$>>>25,$=Ne+Ye|0,He^=$<<9|$>>>23,$=He+Ne|0,We^=$<<13|$>>>19,$=We+He|0,Ye^=$<<18|$>>>14;y[0]=we>>>0&255,y[1]=we>>>8&255,y[2]=we>>>16&255,y[3]=we>>>24&255,y[4]=me>>>0&255,y[5]=me>>>8&255,y[6]=me>>>16&255,y[7]=me>>>24&255,y[8]=ce>>>0&255,y[9]=ce>>>8&255,y[10]=ce>>>16&255,y[11]=ce>>>24&255,y[12]=Ye>>>0&255,y[13]=Ye>>>8&255,y[14]=Ye>>>16&255,y[15]=Ye>>>24&255,y[16]=ie>>>0&255,y[17]=ie>>>8&255,y[18]=ie>>>16&255,y[19]=ie>>>24&255,y[20]=se>>>0&255,y[21]=se>>>8&255,y[22]=se>>>16&255,y[23]=se>>>24&255,y[24]=xe>>>0&255,y[25]=xe>>>8&255,y[26]=xe>>>16&255,y[27]=xe>>>24&255,y[28]=oe>>>0&255,y[29]=oe>>>8&255,y[30]=oe>>>16&255,y[31]=oe>>>24&255}function z(y,C,B,d){P(y,C,B,d)}function V(y,C,B,d){T(y,C,B,d)}var Y=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Z(y,C,B,d,R,g,L){var K=new Uint8Array(16),ne=new Uint8Array(64),pe,de;for(de=0;de<16;de++)K[de]=0;for(de=0;de<8;de++)K[de]=g[de];for(;R>=64;){for(z(ne,K,L,Y),de=0;de<64;de++)y[C+de]=B[d+de]^ne[de];for(pe=1,de=8;de<16;de++)pe=pe+(K[de]&255)|0,K[de]=pe&255,pe>>>=8;R-=64,C+=64,d+=64}if(R>0)for(z(ne,K,L,Y),de=0;de<R;de++)y[C+de]=B[d+de]^ne[de];return 0}function fe(y,C,B,d,R){var g=new Uint8Array(16),L=new Uint8Array(64),K,ne;for(ne=0;ne<16;ne++)g[ne]=0;for(ne=0;ne<8;ne++)g[ne]=d[ne];for(;B>=64;){for(z(L,g,R,Y),ne=0;ne<64;ne++)y[C+ne]=L[ne];for(K=1,ne=8;ne<16;ne++)K=K+(g[ne]&255)|0,g[ne]=K&255,K>>>=8;B-=64,C+=64}if(B>0)for(z(L,g,R,Y),ne=0;ne<B;ne++)y[C+ne]=L[ne];return 0}function ae(y,C,B,d,R){var g=new Uint8Array(32);V(g,d,R,Y);for(var L=new Uint8Array(8),K=0;K<8;K++)L[K]=d[K+16];return fe(y,C,B,L,g)}function X(y,C,B,d,R,g,L){var K=new Uint8Array(32);V(K,g,L,Y);for(var ne=new Uint8Array(8),pe=0;pe<8;pe++)ne[pe]=g[pe+16];return Z(y,C,B,d,R,ne,K)}var S=function(y){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var C,B,d,R,g,L,K,ne;C=y[0]&255|(y[1]&255)<<8,this.r[0]=C&8191,B=y[2]&255|(y[3]&255)<<8,this.r[1]=(C>>>13|B<<3)&8191,d=y[4]&255|(y[5]&255)<<8,this.r[2]=(B>>>10|d<<6)&7939,R=y[6]&255|(y[7]&255)<<8,this.r[3]=(d>>>7|R<<9)&8191,g=y[8]&255|(y[9]&255)<<8,this.r[4]=(R>>>4|g<<12)&255,this.r[5]=g>>>1&8190,L=y[10]&255|(y[11]&255)<<8,this.r[6]=(g>>>14|L<<2)&8191,K=y[12]&255|(y[13]&255)<<8,this.r[7]=(L>>>11|K<<5)&8065,ne=y[14]&255|(y[15]&255)<<8,this.r[8]=(K>>>8|ne<<8)&8191,this.r[9]=ne>>>5&127,this.pad[0]=y[16]&255|(y[17]&255)<<8,this.pad[1]=y[18]&255|(y[19]&255)<<8,this.pad[2]=y[20]&255|(y[21]&255)<<8,this.pad[3]=y[22]&255|(y[23]&255)<<8,this.pad[4]=y[24]&255|(y[25]&255)<<8,this.pad[5]=y[26]&255|(y[27]&255)<<8,this.pad[6]=y[28]&255|(y[29]&255)<<8,this.pad[7]=y[30]&255|(y[31]&255)<<8};S.prototype.blocks=function(y,C,B){for(var d=this.fin?0:2048,R,g,L,K,ne,pe,de,ge,ue,Se,Ee,Fe,ke,Oe,Me,De,we,Be,ye,Ce=this.h[0],Re=this.h[1],me=this.h[2],ie=this.h[3],se=this.h[4],xe=this.h[5],oe=this.h[6],ce=this.h[7],be=this.h[8],Ne=this.h[9],He=this.r[0],We=this.r[1],Ye=this.r[2],$=this.r[3],Ge=this.r[4],lt=this.r[5],xt=this.r[6],Xe=this.r[7],ft=this.r[8],st=this.r[9];B>=16;)R=y[C+0]&255|(y[C+1]&255)<<8,Ce+=R&8191,g=y[C+2]&255|(y[C+3]&255)<<8,Re+=(R>>>13|g<<3)&8191,L=y[C+4]&255|(y[C+5]&255)<<8,me+=(g>>>10|L<<6)&8191,K=y[C+6]&255|(y[C+7]&255)<<8,ie+=(L>>>7|K<<9)&8191,ne=y[C+8]&255|(y[C+9]&255)<<8,se+=(K>>>4|ne<<12)&8191,xe+=ne>>>1&8191,pe=y[C+10]&255|(y[C+11]&255)<<8,oe+=(ne>>>14|pe<<2)&8191,de=y[C+12]&255|(y[C+13]&255)<<8,ce+=(pe>>>11|de<<5)&8191,ge=y[C+14]&255|(y[C+15]&255)<<8,be+=(de>>>8|ge<<8)&8191,Ne+=ge>>>5|d,ue=0,Se=ue,Se+=Ce*He,Se+=Re*(5*st),Se+=me*(5*ft),Se+=ie*(5*Xe),Se+=se*(5*xt),ue=Se>>>13,Se&=8191,Se+=xe*(5*lt),Se+=oe*(5*Ge),Se+=ce*(5*$),Se+=be*(5*Ye),Se+=Ne*(5*We),ue+=Se>>>13,Se&=8191,Ee=ue,Ee+=Ce*We,Ee+=Re*He,Ee+=me*(5*st),Ee+=ie*(5*ft),Ee+=se*(5*Xe),ue=Ee>>>13,Ee&=8191,Ee+=xe*(5*xt),Ee+=oe*(5*lt),Ee+=ce*(5*Ge),Ee+=be*(5*$),Ee+=Ne*(5*Ye),ue+=Ee>>>13,Ee&=8191,Fe=ue,Fe+=Ce*Ye,Fe+=Re*We,Fe+=me*He,Fe+=ie*(5*st),Fe+=se*(5*ft),ue=Fe>>>13,Fe&=8191,Fe+=xe*(5*Xe),Fe+=oe*(5*xt),Fe+=ce*(5*lt),Fe+=be*(5*Ge),Fe+=Ne*(5*$),ue+=Fe>>>13,Fe&=8191,ke=ue,ke+=Ce*$,ke+=Re*Ye,ke+=me*We,ke+=ie*He,ke+=se*(5*st),ue=ke>>>13,ke&=8191,ke+=xe*(5*ft),ke+=oe*(5*Xe),ke+=ce*(5*xt),ke+=be*(5*lt),ke+=Ne*(5*Ge),ue+=ke>>>13,ke&=8191,Oe=ue,Oe+=Ce*Ge,Oe+=Re*$,Oe+=me*Ye,Oe+=ie*We,Oe+=se*He,ue=Oe>>>13,Oe&=8191,Oe+=xe*(5*st),Oe+=oe*(5*ft),Oe+=ce*(5*Xe),Oe+=be*(5*xt),Oe+=Ne*(5*lt),ue+=Oe>>>13,Oe&=8191,Me=ue,Me+=Ce*lt,Me+=Re*Ge,Me+=me*$,Me+=ie*Ye,Me+=se*We,ue=Me>>>13,Me&=8191,Me+=xe*He,Me+=oe*(5*st),Me+=ce*(5*ft),Me+=be*(5*Xe),Me+=Ne*(5*xt),ue+=Me>>>13,Me&=8191,De=ue,De+=Ce*xt,De+=Re*lt,De+=me*Ge,De+=ie*$,De+=se*Ye,ue=De>>>13,De&=8191,De+=xe*We,De+=oe*He,De+=ce*(5*st),De+=be*(5*ft),De+=Ne*(5*Xe),ue+=De>>>13,De&=8191,we=ue,we+=Ce*Xe,we+=Re*xt,we+=me*lt,we+=ie*Ge,we+=se*$,ue=we>>>13,we&=8191,we+=xe*Ye,we+=oe*We,we+=ce*He,we+=be*(5*st),we+=Ne*(5*ft),ue+=we>>>13,we&=8191,Be=ue,Be+=Ce*ft,Be+=Re*Xe,Be+=me*xt,Be+=ie*lt,Be+=se*Ge,ue=Be>>>13,Be&=8191,Be+=xe*$,Be+=oe*Ye,Be+=ce*We,Be+=be*He,Be+=Ne*(5*st),ue+=Be>>>13,Be&=8191,ye=ue,ye+=Ce*st,ye+=Re*ft,ye+=me*Xe,ye+=ie*xt,ye+=se*lt,ue=ye>>>13,ye&=8191,ye+=xe*Ge,ye+=oe*$,ye+=ce*Ye,ye+=be*We,ye+=Ne*He,ue+=ye>>>13,ye&=8191,ue=(ue<<2)+ue|0,ue=ue+Se|0,Se=ue&8191,ue=ue>>>13,Ee+=ue,Ce=Se,Re=Ee,me=Fe,ie=ke,se=Oe,xe=Me,oe=De,ce=we,be=Be,Ne=ye,C+=16,B-=16;this.h[0]=Ce,this.h[1]=Re,this.h[2]=me,this.h[3]=ie,this.h[4]=se,this.h[5]=xe,this.h[6]=oe,this.h[7]=ce,this.h[8]=be,this.h[9]=Ne},S.prototype.finish=function(y,C){var B=new Uint16Array(10),d,R,g,L;if(this.leftover){for(L=this.leftover,this.buffer[L++]=1;L<16;L++)this.buffer[L]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(d=this.h[1]>>>13,this.h[1]&=8191,L=2;L<10;L++)this.h[L]+=d,d=this.h[L]>>>13,this.h[L]&=8191;for(this.h[0]+=d*5,d=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=d,d=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=d,B[0]=this.h[0]+5,d=B[0]>>>13,B[0]&=8191,L=1;L<10;L++)B[L]=this.h[L]+d,d=B[L]>>>13,B[L]&=8191;for(B[9]-=8192,R=(d^1)-1,L=0;L<10;L++)B[L]&=R;for(R=~R,L=0;L<10;L++)this.h[L]=this.h[L]&R|B[L];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,g=this.h[0]+this.pad[0],this.h[0]=g&65535,L=1;L<8;L++)g=(this.h[L]+this.pad[L]|0)+(g>>>16)|0,this.h[L]=g&65535;y[C+0]=this.h[0]>>>0&255,y[C+1]=this.h[0]>>>8&255,y[C+2]=this.h[1]>>>0&255,y[C+3]=this.h[1]>>>8&255,y[C+4]=this.h[2]>>>0&255,y[C+5]=this.h[2]>>>8&255,y[C+6]=this.h[3]>>>0&255,y[C+7]=this.h[3]>>>8&255,y[C+8]=this.h[4]>>>0&255,y[C+9]=this.h[4]>>>8&255,y[C+10]=this.h[5]>>>0&255,y[C+11]=this.h[5]>>>8&255,y[C+12]=this.h[6]>>>0&255,y[C+13]=this.h[6]>>>8&255,y[C+14]=this.h[7]>>>0&255,y[C+15]=this.h[7]>>>8&255},S.prototype.update=function(y,C,B){var d,R;if(this.leftover){for(R=16-this.leftover,R>B&&(R=B),d=0;d<R;d++)this.buffer[this.leftover+d]=y[C+d];if(B-=R,C+=R,this.leftover+=R,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(B>=16&&(R=B-B%16,this.blocks(y,C,R),C+=R,B-=R),B){for(d=0;d<B;d++)this.buffer[this.leftover+d]=y[C+d];this.leftover+=B}};function c(y,C,B,d,R,g){var L=new S(g);return L.update(B,d,R),L.finish(y,C),0}function h(y,C,B,d,R,g){var L=new Uint8Array(16);return c(L,0,B,d,R,g),k(y,C,L,0)}function w(y,C,B,d,R){var g;if(B<32)return-1;for(X(y,0,C,0,B,d,R),c(y,16,y,32,B-32,y),g=0;g<16;g++)y[g]=0;return 0}function M(y,C,B,d,R){var g,L=new Uint8Array(32);if(B<32||(ae(L,0,32,d,R),h(C,16,C,32,B-32,L)!==0))return-1;for(X(y,0,C,0,B,d,R),g=0;g<32;g++)y[g]=0;return 0}function O(y,C){var B;for(B=0;B<16;B++)y[B]=C[B]|0}function U(y){var C,B,d=1;for(C=0;C<16;C++)B=y[C]+d+65535,d=Math.floor(B/65536),y[C]=B-d*65536;y[0]+=d-1+37*(d-1)}function W(y,C,B){for(var d,R=~(B-1),g=0;g<16;g++)d=R&(y[g]^C[g]),y[g]^=d,C[g]^=d}function I(y,C){var B,d,R,g=t(),L=t();for(B=0;B<16;B++)L[B]=C[B];for(U(L),U(L),U(L),d=0;d<2;d++){for(g[0]=L[0]-65517,B=1;B<15;B++)g[B]=L[B]-65535-(g[B-1]>>16&1),g[B-1]&=65535;g[15]=L[15]-32767-(g[14]>>16&1),R=g[15]>>16&1,g[14]&=65535,W(L,g,1-R)}for(B=0;B<16;B++)y[2*B]=L[B]&255,y[2*B+1]=L[B]>>8}function l(y,C){var B=new Uint8Array(32),d=new Uint8Array(32);return I(B,y),I(d,C),H(B,0,d,0)}function F(y){var C=new Uint8Array(32);return I(C,y),C[0]&1}function ee(y,C){var B;for(B=0;B<16;B++)y[B]=C[2*B]+(C[2*B+1]<<8);y[15]&=32767}function J(y,C,B){for(var d=0;d<16;d++)y[d]=C[d]+B[d]}function G(y,C,B){for(var d=0;d<16;d++)y[d]=C[d]-B[d]}function he(y,C,B){var d,R,g=0,L=0,K=0,ne=0,pe=0,de=0,ge=0,ue=0,Se=0,Ee=0,Fe=0,ke=0,Oe=0,Me=0,De=0,we=0,Be=0,ye=0,Ce=0,Re=0,me=0,ie=0,se=0,xe=0,oe=0,ce=0,be=0,Ne=0,He=0,We=0,Ye=0,$=B[0],Ge=B[1],lt=B[2],xt=B[3],Xe=B[4],ft=B[5],st=B[6],Dt=B[7],wt=B[8],Rt=B[9],kt=B[10],Tt=B[11],It=B[12],Lt=B[13],Vt=B[14],Yt=B[15];d=C[0],g+=d*$,L+=d*Ge,K+=d*lt,ne+=d*xt,pe+=d*Xe,de+=d*ft,ge+=d*st,ue+=d*Dt,Se+=d*wt,Ee+=d*Rt,Fe+=d*kt,ke+=d*Tt,Oe+=d*It,Me+=d*Lt,De+=d*Vt,we+=d*Yt,d=C[1],L+=d*$,K+=d*Ge,ne+=d*lt,pe+=d*xt,de+=d*Xe,ge+=d*ft,ue+=d*st,Se+=d*Dt,Ee+=d*wt,Fe+=d*Rt,ke+=d*kt,Oe+=d*Tt,Me+=d*It,De+=d*Lt,we+=d*Vt,Be+=d*Yt,d=C[2],K+=d*$,ne+=d*Ge,pe+=d*lt,de+=d*xt,ge+=d*Xe,ue+=d*ft,Se+=d*st,Ee+=d*Dt,Fe+=d*wt,ke+=d*Rt,Oe+=d*kt,Me+=d*Tt,De+=d*It,we+=d*Lt,Be+=d*Vt,ye+=d*Yt,d=C[3],ne+=d*$,pe+=d*Ge,de+=d*lt,ge+=d*xt,ue+=d*Xe,Se+=d*ft,Ee+=d*st,Fe+=d*Dt,ke+=d*wt,Oe+=d*Rt,Me+=d*kt,De+=d*Tt,we+=d*It,Be+=d*Lt,ye+=d*Vt,Ce+=d*Yt,d=C[4],pe+=d*$,de+=d*Ge,ge+=d*lt,ue+=d*xt,Se+=d*Xe,Ee+=d*ft,Fe+=d*st,ke+=d*Dt,Oe+=d*wt,Me+=d*Rt,De+=d*kt,we+=d*Tt,Be+=d*It,ye+=d*Lt,Ce+=d*Vt,Re+=d*Yt,d=C[5],de+=d*$,ge+=d*Ge,ue+=d*lt,Se+=d*xt,Ee+=d*Xe,Fe+=d*ft,ke+=d*st,Oe+=d*Dt,Me+=d*wt,De+=d*Rt,we+=d*kt,Be+=d*Tt,ye+=d*It,Ce+=d*Lt,Re+=d*Vt,me+=d*Yt,d=C[6],ge+=d*$,ue+=d*Ge,Se+=d*lt,Ee+=d*xt,Fe+=d*Xe,ke+=d*ft,Oe+=d*st,Me+=d*Dt,De+=d*wt,we+=d*Rt,Be+=d*kt,ye+=d*Tt,Ce+=d*It,Re+=d*Lt,me+=d*Vt,ie+=d*Yt,d=C[7],ue+=d*$,Se+=d*Ge,Ee+=d*lt,Fe+=d*xt,ke+=d*Xe,Oe+=d*ft,Me+=d*st,De+=d*Dt,we+=d*wt,Be+=d*Rt,ye+=d*kt,Ce+=d*Tt,Re+=d*It,me+=d*Lt,ie+=d*Vt,se+=d*Yt,d=C[8],Se+=d*$,Ee+=d*Ge,Fe+=d*lt,ke+=d*xt,Oe+=d*Xe,Me+=d*ft,De+=d*st,we+=d*Dt,Be+=d*wt,ye+=d*Rt,Ce+=d*kt,Re+=d*Tt,me+=d*It,ie+=d*Lt,se+=d*Vt,xe+=d*Yt,d=C[9],Ee+=d*$,Fe+=d*Ge,ke+=d*lt,Oe+=d*xt,Me+=d*Xe,De+=d*ft,we+=d*st,Be+=d*Dt,ye+=d*wt,Ce+=d*Rt,Re+=d*kt,me+=d*Tt,ie+=d*It,se+=d*Lt,xe+=d*Vt,oe+=d*Yt,d=C[10],Fe+=d*$,ke+=d*Ge,Oe+=d*lt,Me+=d*xt,De+=d*Xe,we+=d*ft,Be+=d*st,ye+=d*Dt,Ce+=d*wt,Re+=d*Rt,me+=d*kt,ie+=d*Tt,se+=d*It,xe+=d*Lt,oe+=d*Vt,ce+=d*Yt,d=C[11],ke+=d*$,Oe+=d*Ge,Me+=d*lt,De+=d*xt,we+=d*Xe,Be+=d*ft,ye+=d*st,Ce+=d*Dt,Re+=d*wt,me+=d*Rt,ie+=d*kt,se+=d*Tt,xe+=d*It,oe+=d*Lt,ce+=d*Vt,be+=d*Yt,d=C[12],Oe+=d*$,Me+=d*Ge,De+=d*lt,we+=d*xt,Be+=d*Xe,ye+=d*ft,Ce+=d*st,Re+=d*Dt,me+=d*wt,ie+=d*Rt,se+=d*kt,xe+=d*Tt,oe+=d*It,ce+=d*Lt,be+=d*Vt,Ne+=d*Yt,d=C[13],Me+=d*$,De+=d*Ge,we+=d*lt,Be+=d*xt,ye+=d*Xe,Ce+=d*ft,Re+=d*st,me+=d*Dt,ie+=d*wt,se+=d*Rt,xe+=d*kt,oe+=d*Tt,ce+=d*It,be+=d*Lt,Ne+=d*Vt,He+=d*Yt,d=C[14],De+=d*$,we+=d*Ge,Be+=d*lt,ye+=d*xt,Ce+=d*Xe,Re+=d*ft,me+=d*st,ie+=d*Dt,se+=d*wt,xe+=d*Rt,oe+=d*kt,ce+=d*Tt,be+=d*It,Ne+=d*Lt,He+=d*Vt,We+=d*Yt,d=C[15],we+=d*$,Be+=d*Ge,ye+=d*lt,Ce+=d*xt,Re+=d*Xe,me+=d*ft,ie+=d*st,se+=d*Dt,xe+=d*wt,oe+=d*Rt,ce+=d*kt,be+=d*Tt,Ne+=d*It,He+=d*Lt,We+=d*Vt,Ye+=d*Yt,g+=38*Be,L+=38*ye,K+=38*Ce,ne+=38*Re,pe+=38*me,de+=38*ie,ge+=38*se,ue+=38*xe,Se+=38*oe,Ee+=38*ce,Fe+=38*be,ke+=38*Ne,Oe+=38*He,Me+=38*We,De+=38*Ye,R=1,d=g+R+65535,R=Math.floor(d/65536),g=d-R*65536,d=L+R+65535,R=Math.floor(d/65536),L=d-R*65536,d=K+R+65535,R=Math.floor(d/65536),K=d-R*65536,d=ne+R+65535,R=Math.floor(d/65536),ne=d-R*65536,d=pe+R+65535,R=Math.floor(d/65536),pe=d-R*65536,d=de+R+65535,R=Math.floor(d/65536),de=d-R*65536,d=ge+R+65535,R=Math.floor(d/65536),ge=d-R*65536,d=ue+R+65535,R=Math.floor(d/65536),ue=d-R*65536,d=Se+R+65535,R=Math.floor(d/65536),Se=d-R*65536,d=Ee+R+65535,R=Math.floor(d/65536),Ee=d-R*65536,d=Fe+R+65535,R=Math.floor(d/65536),Fe=d-R*65536,d=ke+R+65535,R=Math.floor(d/65536),ke=d-R*65536,d=Oe+R+65535,R=Math.floor(d/65536),Oe=d-R*65536,d=Me+R+65535,R=Math.floor(d/65536),Me=d-R*65536,d=De+R+65535,R=Math.floor(d/65536),De=d-R*65536,d=we+R+65535,R=Math.floor(d/65536),we=d-R*65536,g+=R-1+37*(R-1),R=1,d=g+R+65535,R=Math.floor(d/65536),g=d-R*65536,d=L+R+65535,R=Math.floor(d/65536),L=d-R*65536,d=K+R+65535,R=Math.floor(d/65536),K=d-R*65536,d=ne+R+65535,R=Math.floor(d/65536),ne=d-R*65536,d=pe+R+65535,R=Math.floor(d/65536),pe=d-R*65536,d=de+R+65535,R=Math.floor(d/65536),de=d-R*65536,d=ge+R+65535,R=Math.floor(d/65536),ge=d-R*65536,d=ue+R+65535,R=Math.floor(d/65536),ue=d-R*65536,d=Se+R+65535,R=Math.floor(d/65536),Se=d-R*65536,d=Ee+R+65535,R=Math.floor(d/65536),Ee=d-R*65536,d=Fe+R+65535,R=Math.floor(d/65536),Fe=d-R*65536,d=ke+R+65535,R=Math.floor(d/65536),ke=d-R*65536,d=Oe+R+65535,R=Math.floor(d/65536),Oe=d-R*65536,d=Me+R+65535,R=Math.floor(d/65536),Me=d-R*65536,d=De+R+65535,R=Math.floor(d/65536),De=d-R*65536,d=we+R+65535,R=Math.floor(d/65536),we=d-R*65536,g+=R-1+37*(R-1),y[0]=g,y[1]=L,y[2]=K,y[3]=ne,y[4]=pe,y[5]=de,y[6]=ge,y[7]=ue,y[8]=Se,y[9]=Ee,y[10]=Fe,y[11]=ke,y[12]=Oe,y[13]=Me,y[14]=De,y[15]=we}function _e(y,C){he(y,C,C)}function Le(y,C){var B=t(),d;for(d=0;d<16;d++)B[d]=C[d];for(d=253;d>=0;d--)_e(B,B),d!==2&&d!==4&&he(B,B,C);for(d=0;d<16;d++)y[d]=B[d]}function Ie(y,C){var B=t(),d;for(d=0;d<16;d++)B[d]=C[d];for(d=250;d>=0;d--)_e(B,B),d!==1&&he(B,B,C);for(d=0;d<16;d++)y[d]=B[d]}function je(y,C,B){var d=new Uint8Array(32),R=new Float64Array(80),g,L,K=t(),ne=t(),pe=t(),de=t(),ge=t(),ue=t();for(L=0;L<31;L++)d[L]=C[L];for(d[31]=C[31]&127|64,d[0]&=248,ee(R,B),L=0;L<16;L++)ne[L]=R[L],de[L]=K[L]=pe[L]=0;for(K[0]=de[0]=1,L=254;L>=0;--L)g=d[L>>>3]>>>(L&7)&1,W(K,ne,g),W(pe,de,g),J(ge,K,pe),G(K,K,pe),J(pe,ne,de),G(ne,ne,de),_e(de,ge),_e(ue,K),he(K,pe,K),he(pe,ne,ge),J(ge,K,pe),G(K,K,pe),_e(ne,K),G(pe,de,ue),he(K,pe,u),J(K,K,de),he(pe,pe,K),he(K,de,ue),he(de,ne,R),_e(ne,ge),W(K,ne,g),W(pe,de,g);for(L=0;L<16;L++)R[L+16]=K[L],R[L+32]=pe[L],R[L+48]=ne[L],R[L+64]=de[L];var Se=R.subarray(32),Ee=R.subarray(16);return Le(Se,Se),he(Ee,Ee,Se),I(y,Ee),0}function Ke(y,C){return je(y,C,s)}function dr(y,C){return r(C,32),Ke(y,C)}function at(y,C,B){var d=new Uint8Array(32);return je(d,B,C),V(y,a,d,Y)}var Je=w,Nt=M;function vt(y,C,B,d,R,g){var L=new Uint8Array(32);return at(L,R,g),Je(y,C,B,d,L)}function rt(y,C,B,d,R,g){var L=new Uint8Array(32);return at(L,R,g),Nt(y,C,B,d,L)}var nr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function dt(y,C,B,d){for(var R=new Int32Array(16),g=new Int32Array(16),L,K,ne,pe,de,ge,ue,Se,Ee,Fe,ke,Oe,Me,De,we,Be,ye,Ce,Re,me,ie,se,xe,oe,ce,be,Ne=y[0],He=y[1],We=y[2],Ye=y[3],$=y[4],Ge=y[5],lt=y[6],xt=y[7],Xe=C[0],ft=C[1],st=C[2],Dt=C[3],wt=C[4],Rt=C[5],kt=C[6],Tt=C[7],It=0;d>=128;){for(Re=0;Re<16;Re++)me=8*Re+It,R[Re]=B[me+0]<<24|B[me+1]<<16|B[me+2]<<8|B[me+3],g[Re]=B[me+4]<<24|B[me+5]<<16|B[me+6]<<8|B[me+7];for(Re=0;Re<80;Re++)if(L=Ne,K=He,ne=We,pe=Ye,de=$,ge=Ge,ue=lt,Se=xt,Ee=Xe,Fe=ft,ke=st,Oe=Dt,Me=wt,De=Rt,we=kt,Be=Tt,ie=xt,se=Tt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=($>>>14|wt<<18)^($>>>18|wt<<14)^(wt>>>9|$<<23),se=(wt>>>14|$<<18)^(wt>>>18|$<<14)^($>>>9|wt<<23),xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ie=$&Ge^~$<,se=wt&Rt^~wt&kt,xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ie=nr[Re*2],se=nr[Re*2+1],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ie=R[Re%16],se=g[Re%16],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,ye=ce&65535|be<<16,Ce=xe&65535|oe<<16,ie=ye,se=Ce,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=(Ne>>>28|Xe<<4)^(Xe>>>2|Ne<<30)^(Xe>>>7|Ne<<25),se=(Xe>>>28|Ne<<4)^(Ne>>>2|Xe<<30)^(Ne>>>7|Xe<<25),xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ie=Ne&He^Ne&We^He&We,se=Xe&ft^Xe&st^ft&st,xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,Se=ce&65535|be<<16,Be=xe&65535|oe<<16,ie=pe,se=Oe,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=ye,se=Ce,xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,pe=ce&65535|be<<16,Oe=xe&65535|oe<<16,He=L,We=K,Ye=ne,$=pe,Ge=de,lt=ge,xt=ue,Ne=Se,ft=Ee,st=Fe,Dt=ke,wt=Oe,Rt=Me,kt=De,Tt=we,Xe=Be,Re%16===15)for(me=0;me<16;me++)ie=R[me],se=g[me],xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=R[(me+9)%16],se=g[(me+9)%16],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ye=R[(me+1)%16],Ce=g[(me+1)%16],ie=(ye>>>1|Ce<<31)^(ye>>>8|Ce<<24)^ye>>>7,se=(Ce>>>1|ye<<31)^(Ce>>>8|ye<<24)^(Ce>>>7|ye<<25),xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,ye=R[(me+14)%16],Ce=g[(me+14)%16],ie=(ye>>>19|Ce<<13)^(Ce>>>29|ye<<3)^ye>>>6,se=(Ce>>>19|ye<<13)^(ye>>>29|Ce<<3)^(Ce>>>6|ye<<26),xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,R[me]=ce&65535|be<<16,g[me]=xe&65535|oe<<16;ie=Ne,se=Xe,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[0],se=C[0],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[0]=Ne=ce&65535|be<<16,C[0]=Xe=xe&65535|oe<<16,ie=He,se=ft,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[1],se=C[1],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[1]=He=ce&65535|be<<16,C[1]=ft=xe&65535|oe<<16,ie=We,se=st,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[2],se=C[2],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[2]=We=ce&65535|be<<16,C[2]=st=xe&65535|oe<<16,ie=Ye,se=Dt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[3],se=C[3],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[3]=Ye=ce&65535|be<<16,C[3]=Dt=xe&65535|oe<<16,ie=$,se=wt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[4],se=C[4],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[4]=$=ce&65535|be<<16,C[4]=wt=xe&65535|oe<<16,ie=Ge,se=Rt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[5],se=C[5],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[5]=Ge=ce&65535|be<<16,C[5]=Rt=xe&65535|oe<<16,ie=lt,se=kt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[6],se=C[6],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[6]=lt=ce&65535|be<<16,C[6]=kt=xe&65535|oe<<16,ie=xt,se=Tt,xe=se&65535,oe=se>>>16,ce=ie&65535,be=ie>>>16,ie=y[7],se=C[7],xe+=se&65535,oe+=se>>>16,ce+=ie&65535,be+=ie>>>16,oe+=xe>>>16,ce+=oe>>>16,be+=ce>>>16,y[7]=xt=ce&65535|be<<16,C[7]=Tt=xe&65535|oe<<16,It+=128,d-=128}return d}function Qe(y,C,B){var d=new Int32Array(8),R=new Int32Array(8),g=new Uint8Array(256),L,K=B;for(d[0]=1779033703,d[1]=3144134277,d[2]=1013904242,d[3]=2773480762,d[4]=1359893119,d[5]=2600822924,d[6]=528734635,d[7]=1541459225,R[0]=4089235720,R[1]=2227873595,R[2]=4271175723,R[3]=1595750129,R[4]=2917565137,R[5]=725511199,R[6]=4215389547,R[7]=327033209,dt(d,R,C,B),B%=128,L=0;L<B;L++)g[L]=C[K-B+L];for(g[B]=128,B=256-128*(B<112?1:0),g[B-9]=0,E(g,B-8,K/536870912|0,K<<3),dt(d,R,g,B),L=0;L<8;L++)E(y,8*L,d[L],R[L]);return 0}function Qt(y,C){var B=t(),d=t(),R=t(),g=t(),L=t(),K=t(),ne=t(),pe=t(),de=t();G(B,y[1],y[0]),G(de,C[1],C[0]),he(B,B,de),J(d,y[0],y[1]),J(de,C[0],C[1]),he(d,d,de),he(R,y[3],C[3]),he(R,R,o),he(g,y[2],C[2]),J(g,g,g),G(L,d,B),G(K,g,R),J(ne,g,R),J(pe,d,B),he(y[0],L,K),he(y[1],pe,ne),he(y[2],ne,K),he(y[3],L,pe)}function et(y,C,B){var d;for(d=0;d<4;d++)W(y[d],C[d],B)}function Ve(y,C){var B=t(),d=t(),R=t();Le(R,C[2]),he(B,C[0],R),he(d,C[1],R),I(y,d),y[31]^=F(B)<<7}function Kt(y,C,B){var d,R;for(O(y[0],b),O(y[1],p),O(y[2],p),O(y[3],b),R=255;R>=0;--R)d=B[R/8|0]>>(R&7)&1,et(y,C,d),Qt(C,y),Qt(y,y),et(y,C,d)}function re(y,C){var B=[t(),t(),t(),t()];O(B[0],x),O(B[1],v),O(B[2],p),he(B[3],x,v),Kt(y,B,C)}function Ae(y,C,B){var d=new Uint8Array(64),R=[t(),t(),t(),t()],g;for(B||r(C,32),Qe(d,C,32),d[0]&=248,d[31]&=127,d[31]|=64,re(R,d),Ve(y,R),g=0;g<32;g++)C[g+32]=y[g];return 0}var Ht=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function tt(y,C){var B,d,R,g;for(d=63;d>=32;--d){for(B=0,R=d-32,g=d-12;R<g;++R)C[R]+=B-16*C[d]*Ht[R-(d-32)],B=Math.floor((C[R]+128)/256),C[R]-=B*256;C[R]+=B,C[d]=0}for(B=0,R=0;R<32;R++)C[R]+=B-(C[31]>>4)*Ht[R],B=C[R]>>8,C[R]&=255;for(R=0;R<32;R++)C[R]-=B*Ht[R];for(d=0;d<32;d++)C[d+1]+=C[d]>>8,y[d]=C[d]&255}function Ft(y){var C=new Float64Array(64),B;for(B=0;B<64;B++)C[B]=y[B];for(B=0;B<64;B++)y[B]=0;tt(y,C)}function sr(y,C,B,d){var R=new Uint8Array(64),g=new Uint8Array(64),L=new Uint8Array(64),K,ne,pe=new Float64Array(64),de=[t(),t(),t(),t()];Qe(R,d,32),R[0]&=248,R[31]&=127,R[31]|=64;var ge=B+64;for(K=0;K<B;K++)y[64+K]=C[K];for(K=0;K<32;K++)y[32+K]=R[32+K];for(Qe(L,y.subarray(32),B+32),Ft(L),re(de,L),Ve(y,de),K=32;K<64;K++)y[K]=d[K];for(Qe(g,y,B+64),Ft(g),K=0;K<64;K++)pe[K]=0;for(K=0;K<32;K++)pe[K]=L[K];for(K=0;K<32;K++)for(ne=0;ne<32;ne++)pe[K+ne]+=g[K]*R[ne];return tt(y.subarray(32),pe),ge}function At(y,C){var B=t(),d=t(),R=t(),g=t(),L=t(),K=t(),ne=t();return O(y[2],p),ee(y[1],C),_e(R,y[1]),he(g,R,f),G(R,R,y[2]),J(g,y[2],g),_e(L,g),_e(K,L),he(ne,K,L),he(B,ne,R),he(B,B,g),Ie(B,B),he(B,B,R),he(B,B,g),he(B,B,g),he(y[0],B,g),_e(d,y[0]),he(d,d,g),l(d,R)&&he(y[0],y[0],_),_e(d,y[0]),he(d,d,g),l(d,R)?-1:(F(y[0])===C[31]>>7&&G(y[0],b,y[0]),he(y[3],y[0],y[1]),0)}function nt(y,C,B,d){var R,g=new Uint8Array(32),L=new Uint8Array(64),K=[t(),t(),t(),t()],ne=[t(),t(),t(),t()];if(B<64||At(ne,d))return-1;for(R=0;R<B;R++)y[R]=C[R];for(R=0;R<32;R++)y[R+32]=d[R];if(Qe(L,y,B),Ft(L),Kt(K,ne,L),re(ne,C.subarray(32)),Qt(K,ne),Ve(g,K),B-=64,H(C,0,g,0)){for(R=0;R<B;R++)y[R]=0;return-1}for(R=0;R<B;R++)y[R]=C[R+64];return B}var ir=32,Bt=24,ot=32,er=16,yt=32,gt=32,ar=32,ut=32,_t=32,tr=Bt,Et=ot,Mt=er,Wt=64,mt=32,ht=64,ur=32,Ct=64;e.lowlevel={crypto_core_hsalsa20:V,crypto_stream_xor:X,crypto_stream:ae,crypto_stream_salsa20_xor:Z,crypto_stream_salsa20:fe,crypto_onetimeauth:c,crypto_onetimeauth_verify:h,crypto_verify_16:k,crypto_verify_32:H,crypto_secretbox:w,crypto_secretbox_open:M,crypto_scalarmult:je,crypto_scalarmult_base:Ke,crypto_box_beforenm:at,crypto_box_afternm:Je,crypto_box:vt,crypto_box_open:rt,crypto_box_keypair:dr,crypto_hash:Qe,crypto_sign:sr,crypto_sign_keypair:Ae,crypto_sign_open:nt,crypto_secretbox_KEYBYTES:ir,crypto_secretbox_NONCEBYTES:Bt,crypto_secretbox_ZEROBYTES:ot,crypto_secretbox_BOXZEROBYTES:er,crypto_scalarmult_BYTES:yt,crypto_scalarmult_SCALARBYTES:gt,crypto_box_PUBLICKEYBYTES:ar,crypto_box_SECRETKEYBYTES:ut,crypto_box_BEFORENMBYTES:_t,crypto_box_NONCEBYTES:tr,crypto_box_ZEROBYTES:Et,crypto_box_BOXZEROBYTES:Mt,crypto_sign_BYTES:Wt,crypto_sign_PUBLICKEYBYTES:mt,crypto_sign_SECRETKEYBYTES:ht,crypto_sign_SEEDBYTES:ur,crypto_hash_BYTES:Ct,gf:t,D:f,L:Ht,pack25519:I,unpack25519:ee,M:he,A:J,S:_e,Z:G,pow2523:Ie,add:Qt,set25519:O,modL:tt,scalarmult:Kt,scalarbase:re};function St(y,C){if(y.length!==ir)throw new Error("bad key size");if(C.length!==Bt)throw new Error("bad nonce size")}function wr(y,C){if(y.length!==ar)throw new Error("bad public key size");if(C.length!==ut)throw new Error("bad secret key size")}function Ze(){for(var y=0;y<arguments.length;y++)if(!(arguments[y]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function qe(y){for(var C=0;C<y.length;C++)y[C]=0}e.randomBytes=function(y){var C=new Uint8Array(y);return r(C,y),C},e.secretbox=function(y,C,B){Ze(y,C,B),St(B,C);for(var d=new Uint8Array(ot+y.length),R=new Uint8Array(d.length),g=0;g<y.length;g++)d[g+ot]=y[g];return w(R,d,d.length,C,B),R.subarray(er)},e.secretbox.open=function(y,C,B){Ze(y,C,B),St(B,C);for(var d=new Uint8Array(er+y.length),R=new Uint8Array(d.length),g=0;g<y.length;g++)d[g+er]=y[g];return d.length<32||M(R,d,d.length,C,B)!==0?null:R.subarray(ot)},e.secretbox.keyLength=ir,e.secretbox.nonceLength=Bt,e.secretbox.overheadLength=er,e.scalarMult=function(y,C){if(Ze(y,C),y.length!==gt)throw new Error("bad n size");if(C.length!==yt)throw new Error("bad p size");var B=new Uint8Array(yt);return je(B,y,C),B},e.scalarMult.base=function(y){if(Ze(y),y.length!==gt)throw new Error("bad n size");var C=new Uint8Array(yt);return Ke(C,y),C},e.scalarMult.scalarLength=gt,e.scalarMult.groupElementLength=yt,e.box=function(y,C,B,d){var R=e.box.before(B,d);return e.secretbox(y,C,R)},e.box.before=function(y,C){Ze(y,C),wr(y,C);var B=new Uint8Array(_t);return at(B,y,C),B},e.box.after=e.secretbox,e.box.open=function(y,C,B,d){var R=e.box.before(B,d);return e.secretbox.open(y,C,R)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var y=new Uint8Array(ar),C=new Uint8Array(ut);return dr(y,C),{publicKey:y,secretKey:C}},e.box.keyPair.fromSecretKey=function(y){if(Ze(y),y.length!==ut)throw new Error("bad secret key size");var C=new Uint8Array(ar);return Ke(C,y),{publicKey:C,secretKey:new Uint8Array(y)}},e.box.publicKeyLength=ar,e.box.secretKeyLength=ut,e.box.sharedKeyLength=_t,e.box.nonceLength=tr,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(y,C){if(Ze(y,C),C.length!==ht)throw new Error("bad secret key size");var B=new Uint8Array(Wt+y.length);return sr(B,y,y.length,C),B},e.sign.open=function(y,C){if(Ze(y,C),C.length!==mt)throw new Error("bad public key size");var B=new Uint8Array(y.length),d=nt(B,y,y.length,C);if(d<0)return null;for(var R=new Uint8Array(d),g=0;g<R.length;g++)R[g]=B[g];return R},e.sign.detached=function(y,C){for(var B=e.sign(y,C),d=new Uint8Array(Wt),R=0;R<d.length;R++)d[R]=B[R];return d},e.sign.detached.verify=function(y,C,B){if(Ze(y,C,B),C.length!==Wt)throw new Error("bad signature size");if(B.length!==mt)throw new Error("bad public key size");var d=new Uint8Array(Wt+y.length),R=new Uint8Array(Wt+y.length),g;for(g=0;g<Wt;g++)d[g]=C[g];for(g=0;g<y.length;g++)d[g+Wt]=y[g];return nt(R,d,d.length,B)>=0},e.sign.keyPair=function(){var y=new Uint8Array(mt),C=new Uint8Array(ht);return Ae(y,C),{publicKey:y,secretKey:C}},e.sign.keyPair.fromSecretKey=function(y){if(Ze(y),y.length!==ht)throw new Error("bad secret key size");for(var C=new Uint8Array(mt),B=0;B<C.length;B++)C[B]=y[32+B];return{publicKey:C,secretKey:new Uint8Array(y)}},e.sign.keyPair.fromSeed=function(y){if(Ze(y),y.length!==ur)throw new Error("bad seed size");for(var C=new Uint8Array(mt),B=new Uint8Array(ht),d=0;d<32;d++)B[d]=y[d];return Ae(C,B,!0),{publicKey:C,secretKey:B}},e.sign.publicKeyLength=mt,e.sign.secretKeyLength=ht,e.sign.seedLength=ur,e.sign.signatureLength=Wt,e.hash=function(y){Ze(y);var C=new Uint8Array(Ct);return Qe(C,y,y.length),C},e.hash.hashLength=Ct,e.verify=function(y,C){return Ze(y,C),y.length===0||C.length===0||y.length!==C.length?!1:D(y,0,C,0,y.length)===0},e.setPRNG=function(y){r=y},function(){var y=typeof self<"u"?self.crypto||self.msCrypto:null;if(y&&y.getRandomValues){var C=65536;e.setPRNG(function(B,d){var R,g=new Uint8Array(d);for(R=0;R<d;R+=C)y.getRandomValues(g.subarray(R,R+Math.min(d-R,C)));for(R=0;R<d;R++)B[R]=g[R];qe(g)})}else typeof bs<"u"&&(y=V0,y&&y.randomBytes&&e.setPRNG(function(B,d){var R,g=y.randomBytes(d);for(R=0;R<d;R++)B[R]=g[R];qe(g)}))}()})(i.exports?i.exports:self.nacl=self.nacl||{})}(Qn)),Qn.exports}var Nf;function po(){return Nf||(Nf=1,function(i,e){(function(t,r){i.exports=r(d0(),xo())})(Ue,function(t,r){return function(){var a=t,s=a.Util,b=a.Enc;a.Sign={KEY_SIZE:64,SIGNATURE_SIZE:128,keyPair:function(){let p=r.sign.keyPair(),u={};return u.private_key=s.byteToHex(p.secretKey).slice(0,this.KEY_SIZE),u.public_key=s.byteToHex(p.publicKey),u.address=this.address(u.public_key),u},privateKey:function(){return s.byteToHex(r.sign.keyPair().secretKey).slice(0,this.KEY_SIZE)},publicKey:function(p){return s.byteToHex(r.sign.keyPair.fromSeed(s.hexToByte(p)).publicKey)},address:function(p){return b.idHash(p)},addressValidity:function(p){return b.idHashValidity(p)},signature:function(p,u){return s.byteToHex(r.sign.detached(s.stringToByte(b.string(p)),s.hexToByte(u+this.publicKey(u))))},signatureValidity:function(p,u,f){return f.length===this.SIGNATURE_SIZE&&b.isHex(f)===!0&&r.sign.detached.verify(s.stringToByte(b.string(p)),s.hexToByte(f),s.hexToByte(u))},keyValidity:function(p){return typeof p=="string"&&/^[a-fA-F0-9]{64}$/.test(p)}}}(),t.Sign})}(Jn)),Jn.exports}var ei={exports:{}},ti,qf;function bo(){if(qf)return ti;qf=1;function i(m,A){return function(){return m.apply(A,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(m=>A=>{const N=e.call(A);return m[N]||(m[N]=N.slice(8,-1).toLowerCase())})(Object.create(null)),a=m=>(m=m.toLowerCase(),A=>r(A)===m),s=m=>A=>typeof A===m,{isArray:b}=Array,p=s("undefined");function u(m){return m!==null&&!p(m)&&m.constructor!==null&&!p(m.constructor)&&v(m.constructor.isBuffer)&&m.constructor.isBuffer(m)}const f=a("ArrayBuffer");function o(m){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(m):A=m&&m.buffer&&f(m.buffer),A}const x=s("string"),v=s("function"),_=s("number"),E=m=>m!==null&&typeof m=="object",D=m=>m===!0||m===!1,k=m=>{if(r(m)!=="object")return!1;const A=t(m);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(Symbol.toStringTag in m)&&!(Symbol.iterator in m)},H=a("Date"),P=a("File"),T=a("Blob"),z=a("FileList"),V=m=>E(m)&&v(m.pipe),Y=m=>{let A;return m&&(typeof FormData=="function"&&m instanceof FormData||v(m.append)&&((A=r(m))==="formdata"||A==="object"&&v(m.toString)&&m.toString()==="[object FormData]"))},Z=a("URLSearchParams"),[fe,ae,X,S]=["ReadableStream","Request","Response","Headers"].map(a),c=m=>m.trim?m.trim():m.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function h(m,A,{allOwnKeys:N=!1}={}){if(m===null||typeof m>"u")return;let q,j;if(typeof m!="object"&&(m=[m]),b(m))for(q=0,j=m.length;q<j;q++)A.call(null,m[q],q,m);else{const Q=N?Object.getOwnPropertyNames(m):Object.keys(m),te=Q.length;let le;for(q=0;q<te;q++)le=Q[q],A.call(null,m[le],le,m)}}function w(m,A){A=A.toLowerCase();const N=Object.keys(m);let q=N.length,j;for(;q-- >0;)if(j=N[q],A===j.toLowerCase())return j;return null}const M=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ue,O=m=>!p(m)&&m!==M;function U(){const{caseless:m}=O(this)&&this||{},A={},N=(q,j)=>{const Q=m&&w(A,j)||j;k(A[Q])&&k(q)?A[Q]=U(A[Q],q):k(q)?A[Q]=U({},q):b(q)?A[Q]=q.slice():A[Q]=q};for(let q=0,j=arguments.length;q<j;q++)arguments[q]&&h(arguments[q],N);return A}const W=(m,A,N,{allOwnKeys:q}={})=>(h(A,(j,Q)=>{N&&v(j)?m[Q]=i(j,N):m[Q]=j},{allOwnKeys:q}),m),I=m=>(m.charCodeAt(0)===65279&&(m=m.slice(1)),m),l=(m,A,N,q)=>{m.prototype=Object.create(A.prototype,q),m.prototype.constructor=m,Object.defineProperty(m,"super",{value:A.prototype}),N&&Object.assign(m.prototype,N)},F=(m,A,N,q)=>{let j,Q,te;const le={};if(A=A||{},m==null)return A;do{for(j=Object.getOwnPropertyNames(m),Q=j.length;Q-- >0;)te=j[Q],(!q||q(te,m,A))&&!le[te]&&(A[te]=m[te],le[te]=!0);m=N!==!1&&t(m)}while(m&&(!N||N(m,A))&&m!==Object.prototype);return A},ee=(m,A,N)=>{m=String(m),(N===void 0||N>m.length)&&(N=m.length),N-=A.length;const q=m.indexOf(A,N);return q!==-1&&q===N},J=m=>{if(!m)return null;if(b(m))return m;let A=m.length;if(!_(A))return null;const N=new Array(A);for(;A-- >0;)N[A]=m[A];return N},G=(m=>A=>m&&A instanceof m)(typeof Uint8Array<"u"&&t(Uint8Array)),he=(m,A)=>{const q=(m&&m[Symbol.iterator]).call(m);let j;for(;(j=q.next())&&!j.done;){const Q=j.value;A.call(m,Q[0],Q[1])}},_e=(m,A)=>{let N;const q=[];for(;(N=m.exec(A))!==null;)q.push(N);return q},Le=a("HTMLFormElement"),Ie=m=>m.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(N,q,j){return q.toUpperCase()+j}),je=(({hasOwnProperty:m})=>(A,N)=>m.call(A,N))(Object.prototype),Ke=a("RegExp"),dr=(m,A)=>{const N=Object.getOwnPropertyDescriptors(m),q={};h(N,(j,Q)=>{let te;(te=A(j,Q,m))!==!1&&(q[Q]=te||j)}),Object.defineProperties(m,q)},at=m=>{dr(m,(A,N)=>{if(v(m)&&["arguments","caller","callee"].indexOf(N)!==-1)return!1;const q=m[N];if(v(q)){if(A.enumerable=!1,"writable"in A){A.writable=!1;return}A.set||(A.set=()=>{throw Error("Can not rewrite read-only method '"+N+"'")})}})},Je=(m,A)=>{const N={},q=j=>{j.forEach(Q=>{N[Q]=!0})};return b(m)?q(m):q(String(m).split(A)),N},Nt=()=>{},vt=(m,A)=>m!=null&&Number.isFinite(m=+m)?m:A,rt="abcdefghijklmnopqrstuvwxyz",nr="0123456789",dt={DIGIT:nr,ALPHA:rt,ALPHA_DIGIT:rt+rt.toUpperCase()+nr},Qe=(m=16,A=dt.ALPHA_DIGIT)=>{let N="";const{length:q}=A;for(;m--;)N+=A[Math.random()*q|0];return N};function Qt(m){return!!(m&&v(m.append)&&m[Symbol.toStringTag]==="FormData"&&m[Symbol.iterator])}const et=m=>{const A=new Array(10),N=(q,j)=>{if(E(q)){if(A.indexOf(q)>=0)return;if(!("toJSON"in q)){A[j]=q;const Q=b(q)?[]:{};return h(q,(te,le)=>{const Te=N(te,j+1);!p(Te)&&(Q[le]=Te)}),A[j]=void 0,Q}}return q};return N(m,0)},Ve=a("AsyncFunction");var re={isArray:b,isArrayBuffer:f,isBuffer:u,isFormData:Y,isArrayBufferView:o,isString:x,isNumber:_,isBoolean:D,isObject:E,isPlainObject:k,isReadableStream:fe,isRequest:ae,isResponse:X,isHeaders:S,isUndefined:p,isDate:H,isFile:P,isBlob:T,isRegExp:Ke,isFunction:v,isStream:V,isURLSearchParams:Z,isTypedArray:G,isFileList:z,forEach:h,merge:U,extend:W,trim:c,stripBOM:I,inherits:l,toFlatObject:F,kindOf:r,kindOfTest:a,endsWith:ee,toArray:J,forEachEntry:he,matchAll:_e,isHTMLForm:Le,hasOwnProperty:je,hasOwnProp:je,reduceDescriptors:dr,freezeMethods:at,toObjectSet:Je,toCamelCase:Ie,noop:Nt,toFiniteNumber:vt,findKey:w,global:M,isContextDefined:O,ALPHABET:dt,generateString:Qe,isSpecCompliantForm:Qt,toJSONObject:et,isAsyncFn:Ve,isThenable:m=>m&&(E(m)||v(m))&&v(m.then)&&v(m.catch)};function Ae(m,A,N,q,j){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=m,this.name="AxiosError",A&&(this.code=A),N&&(this.config=N),q&&(this.request=q),j&&(this.response=j)}re.inherits(Ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ht=Ae.prototype,tt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(m=>{tt[m]={value:m}}),Object.defineProperties(Ae,tt),Object.defineProperty(Ht,"isAxiosError",{value:!0}),Ae.from=(m,A,N,q,j,Q)=>{const te=Object.create(Ht);return re.toFlatObject(m,te,function(Te){return Te!==Error.prototype},le=>le!=="isAxiosError"),Ae.call(te,m.message,A,N,q,j),te.cause=m,te.name=m.name,Q&&Object.assign(te,Q),te};var Ft=null;function sr(m){return re.isPlainObject(m)||re.isArray(m)}function At(m){return re.endsWith(m,"[]")?m.slice(0,-2):m}function nt(m,A,N){return m?m.concat(A).map(function(j,Q){return j=At(j),!N&&Q?"["+j+"]":j}).join(N?".":""):A}function ir(m){return re.isArray(m)&&!m.some(sr)}const Bt=re.toFlatObject(re,{},null,function(A){return/^is[A-Z]/.test(A)});function ot(m,A,N){if(!re.isObject(m))throw new TypeError("target must be an object");A=A||new FormData,N=re.toFlatObject(N,{metaTokens:!0,dots:!1,indexes:!1},!1,function(it,or){return!re.isUndefined(or[it])});const q=N.metaTokens,j=N.visitor||ve,Q=N.dots,te=N.indexes,Te=(N.Blob||typeof Blob<"u"&&Blob)&&re.isSpecCompliantForm(A);if(!re.isFunction(j))throw new TypeError("visitor must be a function");function Pe(ze){if(ze===null)return"";if(re.isDate(ze))return ze.toISOString();if(!Te&&re.isBlob(ze))throw new Ae("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(ze)||re.isTypedArray(ze)?Te&&typeof Blob=="function"?new Blob([ze]):Buffer.from(ze):ze}function ve(ze,it,or){let cr=ze;if(ze&&!or&&typeof ze=="object"){if(re.endsWith(it,"{}"))it=q?it:it.slice(0,-2),ze=JSON.stringify(ze);else if(re.isArray(ze)&&ir(ze)||(re.isFileList(ze)||re.endsWith(it,"[]"))&&(cr=re.toArray(ze)))return it=At(it),cr.forEach(function(qt,y0){!(re.isUndefined(qt)||qt===null)&&A.append(te===!0?nt([it],y0,Q):te===null?it:it+"[]",Pe(qt))}),!1}return sr(ze)?!0:(A.append(nt(or,it,Q),Pe(ze)),!1)}const $e=[],Ut=Object.assign(Bt,{defaultVisitor:ve,convertValue:Pe,isVisitable:sr});function Ot(ze,it){if(!re.isUndefined(ze)){if($e.indexOf(ze)!==-1)throw Error("Circular reference detected in "+it.join("."));$e.push(ze),re.forEach(ze,function(cr,Tr){(!(re.isUndefined(cr)||cr===null)&&j.call(A,cr,re.isString(Tr)?Tr.trim():Tr,it,Ut))===!0&&Ot(cr,it?it.concat(Tr):[Tr])}),$e.pop()}}if(!re.isObject(m))throw new TypeError("data must be an object");return Ot(m),A}function er(m){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(m).replace(/[!'()~]|%20|%00/g,function(q){return A[q]})}function yt(m,A){this._pairs=[],m&&ot(m,this,A)}const gt=yt.prototype;gt.append=function(A,N){this._pairs.push([A,N])},gt.toString=function(A){const N=A?function(q){return A.call(this,q,er)}:er;return this._pairs.map(function(j){return N(j[0])+"="+N(j[1])},"").join("&")};function ar(m){return encodeURIComponent(m).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ut(m,A,N){if(!A)return m;const q=N&&N.encode||ar,j=N&&N.serialize;let Q;if(j?Q=j(A,N):Q=re.isURLSearchParams(A)?A.toString():new yt(A,N).toString(q),Q){const te=m.indexOf("#");te!==-1&&(m=m.slice(0,te)),m+=(m.indexOf("?")===-1?"?":"&")+Q}return m}class _t{constructor(){this.handlers=[]}use(A,N,q){return this.handlers.push({fulfilled:A,rejected:N,synchronous:q?q.synchronous:!1,runWhen:q?q.runWhen:null}),this.handlers.length-1}eject(A){this.handlers[A]&&(this.handlers[A]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(A){re.forEach(this.handlers,function(q){q!==null&&A(q)})}}var tr=_t,Et={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mt=typeof URLSearchParams<"u"?URLSearchParams:yt,Wt=typeof FormData<"u"?FormData:null,mt=typeof Blob<"u"?Blob:null,ht={isBrowser:!0,classes:{URLSearchParams:Mt,FormData:Wt,Blob:mt},protocols:["http","https","file","blob","url","data"]};const ur=typeof window<"u"&&typeof document<"u",Ct=(m=>ur&&["ReactNative","NativeScript","NS"].indexOf(m)<0)(typeof navigator<"u"&&navigator.product),St=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wr=ur&&window.location.href||"http://localhost";var Ze=Object.freeze({__proto__:null,hasBrowserEnv:ur,hasStandardBrowserWebWorkerEnv:St,hasStandardBrowserEnv:Ct,origin:wr}),qe={...Ze,...ht};function y(m,A){return ot(m,new qe.classes.URLSearchParams,Object.assign({visitor:function(N,q,j,Q){return qe.isNode&&re.isBuffer(N)?(this.append(q,N.toString("base64")),!1):Q.defaultVisitor.apply(this,arguments)}},A))}function C(m){return re.matchAll(/\w+|\[(\w*)]/g,m).map(A=>A[0]==="[]"?"":A[1]||A[0])}function B(m){const A={},N=Object.keys(m);let q;const j=N.length;let Q;for(q=0;q<j;q++)Q=N[q],A[Q]=m[Q];return A}function d(m){function A(N,q,j,Q){let te=N[Q++];if(te==="__proto__")return!0;const le=Number.isFinite(+te),Te=Q>=N.length;return te=!te&&re.isArray(j)?j.length:te,Te?(re.hasOwnProp(j,te)?j[te]=[j[te],q]:j[te]=q,!le):((!j[te]||!re.isObject(j[te]))&&(j[te]=[]),A(N,q,j[te],Q)&&re.isArray(j[te])&&(j[te]=B(j[te])),!le)}if(re.isFormData(m)&&re.isFunction(m.entries)){const N={};return re.forEachEntry(m,(q,j)=>{A(C(q),j,N,0)}),N}return null}function R(m,A,N){if(re.isString(m))try{return(A||JSON.parse)(m),re.trim(m)}catch(q){if(q.name!=="SyntaxError")throw q}return(0,JSON.stringify)(m)}const g={transitional:Et,adapter:["xhr","http","fetch"],transformRequest:[function(A,N){const q=N.getContentType()||"",j=q.indexOf("application/json")>-1,Q=re.isObject(A);if(Q&&re.isHTMLForm(A)&&(A=new FormData(A)),re.isFormData(A))return j?JSON.stringify(d(A)):A;if(re.isArrayBuffer(A)||re.isBuffer(A)||re.isStream(A)||re.isFile(A)||re.isBlob(A)||re.isReadableStream(A))return A;if(re.isArrayBufferView(A))return A.buffer;if(re.isURLSearchParams(A))return N.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),A.toString();let le;if(Q){if(q.indexOf("application/x-www-form-urlencoded")>-1)return y(A,this.formSerializer).toString();if((le=re.isFileList(A))||q.indexOf("multipart/form-data")>-1){const Te=this.env&&this.env.FormData;return ot(le?{"files[]":A}:A,Te&&new Te,this.formSerializer)}}return Q||j?(N.setContentType("application/json",!1),R(A)):A}],transformResponse:[function(A){const N=this.transitional||g.transitional,q=N&&N.forcedJSONParsing,j=this.responseType==="json";if(re.isResponse(A)||re.isReadableStream(A))return A;if(A&&re.isString(A)&&(q&&!this.responseType||j)){const te=!(N&&N.silentJSONParsing)&&j;try{return JSON.parse(A)}catch(le){if(te)throw le.name==="SyntaxError"?Ae.from(le,Ae.ERR_BAD_RESPONSE,this,null,this.response):le}}return A}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],m=>{g.headers[m]={}});var L=g;const K=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ne=m=>{const A={};let N,q,j;return m&&m.split(`
|
|
52
|
-
`).forEach(function(te){j=te.indexOf(":"),N=te.substring(0,j).trim().toLowerCase(),q=te.substring(j+1).trim(),!(!N||A[N]&&K[N])&&(N==="set-cookie"?A[N]?A[N].push(q):A[N]=[q]:A[N]=A[N]?A[N]+", "+q:q)}),A};const pe=Symbol("internals");function de(m){return m&&String(m).trim().toLowerCase()}function ge(m){return m===!1||m==null?m:re.isArray(m)?m.map(ge):String(m)}function ue(m){const A=Object.create(null),N=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let q;for(;q=N.exec(m);)A[q[1]]=q[2];return A}const Se=m=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(m.trim());function Ee(m,A,N,q,j){if(re.isFunction(q))return q.call(this,A,N);if(j&&(A=N),!!re.isString(A)){if(re.isString(q))return A.indexOf(q)!==-1;if(re.isRegExp(q))return q.test(A)}}function Fe(m){return m.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(A,N,q)=>N.toUpperCase()+q)}function ke(m,A){const N=re.toCamelCase(" "+A);["get","set","has"].forEach(q=>{Object.defineProperty(m,q+N,{value:function(j,Q,te){return this[q].call(this,A,j,Q,te)},configurable:!0})})}class Oe{constructor(A){A&&this.set(A)}set(A,N,q){const j=this;function Q(le,Te,Pe){const ve=de(Te);if(!ve)throw new Error("header name must be a non-empty string");const $e=re.findKey(j,ve);(!$e||j[$e]===void 0||Pe===!0||Pe===void 0&&j[$e]!==!1)&&(j[$e||Te]=ge(le))}const te=(le,Te)=>re.forEach(le,(Pe,ve)=>Q(Pe,ve,Te));if(re.isPlainObject(A)||A instanceof this.constructor)te(A,N);else if(re.isString(A)&&(A=A.trim())&&!Se(A))te(ne(A),N);else if(re.isHeaders(A))for(const[le,Te]of A.entries())Q(Te,le,q);else A!=null&&Q(N,A,q);return this}get(A,N){if(A=de(A),A){const q=re.findKey(this,A);if(q){const j=this[q];if(!N)return j;if(N===!0)return ue(j);if(re.isFunction(N))return N.call(this,j,q);if(re.isRegExp(N))return N.exec(j);throw new TypeError("parser must be boolean|regexp|function")}}}has(A,N){if(A=de(A),A){const q=re.findKey(this,A);return!!(q&&this[q]!==void 0&&(!N||Ee(this,this[q],q,N)))}return!1}delete(A,N){const q=this;let j=!1;function Q(te){if(te=de(te),te){const le=re.findKey(q,te);le&&(!N||Ee(q,q[le],le,N))&&(delete q[le],j=!0)}}return re.isArray(A)?A.forEach(Q):Q(A),j}clear(A){const N=Object.keys(this);let q=N.length,j=!1;for(;q--;){const Q=N[q];(!A||Ee(this,this[Q],Q,A,!0))&&(delete this[Q],j=!0)}return j}normalize(A){const N=this,q={};return re.forEach(this,(j,Q)=>{const te=re.findKey(q,Q);if(te){N[te]=ge(j),delete N[Q];return}const le=A?Fe(Q):String(Q).trim();le!==Q&&delete N[Q],N[le]=ge(j),q[le]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){const N=Object.create(null);return re.forEach(this,(q,j)=>{q!=null&&q!==!1&&(N[j]=A&&re.isArray(q)?q.join(", "):q)}),N}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([A,N])=>A+": "+N).join(`
|
|
53
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...N){const q=new this(A);return N.forEach(j=>q.set(j)),q}static accessor(A){const q=(this[pe]=this[pe]={accessors:{}}).accessors,j=this.prototype;function Q(te){const le=de(te);q[le]||(ke(j,te),q[le]=!0)}return re.isArray(A)?A.forEach(Q):Q(A),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Oe.prototype,({value:m},A)=>{let N=A[0].toUpperCase()+A.slice(1);return{get:()=>m,set(q){this[N]=q}}}),re.freezeMethods(Oe);var Me=Oe;function De(m,A){const N=this||L,q=A||N,j=Me.from(q.headers);let Q=q.data;return re.forEach(m,function(le){Q=le.call(N,Q,j.normalize(),A?A.status:void 0)}),j.normalize(),Q}function we(m){return!!(m&&m.__CANCEL__)}function Be(m,A,N){Ae.call(this,m??"canceled",Ae.ERR_CANCELED,A,N),this.name="CanceledError"}re.inherits(Be,Ae,{__CANCEL__:!0});function ye(m,A,N){const q=N.config.validateStatus;!N.status||!q||q(N.status)?m(N):A(new Ae("Request failed with status code "+N.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(N.status/100)-4],N.config,N.request,N))}function Ce(m){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(m);return A&&A[1]||""}function Re(m,A){m=m||10;const N=new Array(m),q=new Array(m);let j=0,Q=0,te;return A=A!==void 0?A:1e3,function(Te){const Pe=Date.now(),ve=q[Q];te||(te=Pe),N[j]=Te,q[j]=Pe;let $e=Q,Ut=0;for(;$e!==j;)Ut+=N[$e++],$e=$e%m;if(j=(j+1)%m,j===Q&&(Q=(Q+1)%m),Pe-te<A)return;const Ot=ve&&Pe-ve;return Ot?Math.round(Ut*1e3/Ot):void 0}}function me(m,A){let N=0;const q=1e3/A;let j=null;return function(){const te=this===!0,le=Date.now();if(te||le-N>q)return j&&(clearTimeout(j),j=null),N=le,m.apply(null,arguments);j||(j=setTimeout(()=>(j=null,N=Date.now(),m.apply(null,arguments)),q-(le-N)))}}var ie=(m,A,N=3)=>{let q=0;const j=Re(50,250);return me(Q=>{const te=Q.loaded,le=Q.lengthComputable?Q.total:void 0,Te=te-q,Pe=j(Te),ve=te<=le;q=te;const $e={loaded:te,total:le,progress:le?te/le:void 0,bytes:Te,rate:Pe||void 0,estimated:Pe&&le&&ve?(le-te)/Pe:void 0,event:Q,lengthComputable:le!=null};$e[A?"download":"upload"]=!0,m($e)},N)},se=qe.hasStandardBrowserEnv?function(){const A=/(msie|trident)/i.test(navigator.userAgent),N=document.createElement("a");let q;function j(Q){let te=Q;return A&&(N.setAttribute("href",te),te=N.href),N.setAttribute("href",te),{href:N.href,protocol:N.protocol?N.protocol.replace(/:$/,""):"",host:N.host,search:N.search?N.search.replace(/^\?/,""):"",hash:N.hash?N.hash.replace(/^#/,""):"",hostname:N.hostname,port:N.port,pathname:N.pathname.charAt(0)==="/"?N.pathname:"/"+N.pathname}}return q=j(window.location.href),function(te){const le=re.isString(te)?j(te):te;return le.protocol===q.protocol&&le.host===q.host}}():function(){return function(){return!0}}(),xe=qe.hasStandardBrowserEnv?{write(m,A,N,q,j,Q){const te=[m+"="+encodeURIComponent(A)];re.isNumber(N)&&te.push("expires="+new Date(N).toGMTString()),re.isString(q)&&te.push("path="+q),re.isString(j)&&te.push("domain="+j),Q===!0&&te.push("secure"),document.cookie=te.join("; ")},read(m){const A=document.cookie.match(new RegExp("(^|;\\s*)("+m+")=([^;]*)"));return A?decodeURIComponent(A[3]):null},remove(m){this.write(m,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oe(m){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(m)}function ce(m,A){return A?m.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):m}function be(m,A){return m&&!oe(A)?ce(m,A):A}const Ne=m=>m instanceof Me?{...m}:m;function He(m,A){A=A||{};const N={};function q(Pe,ve,$e){return re.isPlainObject(Pe)&&re.isPlainObject(ve)?re.merge.call({caseless:$e},Pe,ve):re.isPlainObject(ve)?re.merge({},ve):re.isArray(ve)?ve.slice():ve}function j(Pe,ve,$e){if(re.isUndefined(ve)){if(!re.isUndefined(Pe))return q(void 0,Pe,$e)}else return q(Pe,ve,$e)}function Q(Pe,ve){if(!re.isUndefined(ve))return q(void 0,ve)}function te(Pe,ve){if(re.isUndefined(ve)){if(!re.isUndefined(Pe))return q(void 0,Pe)}else return q(void 0,ve)}function le(Pe,ve,$e){if($e in A)return q(Pe,ve);if($e in m)return q(void 0,Pe)}const Te={url:Q,method:Q,data:Q,baseURL:te,transformRequest:te,transformResponse:te,paramsSerializer:te,timeout:te,timeoutMessage:te,withCredentials:te,withXSRFToken:te,adapter:te,responseType:te,xsrfCookieName:te,xsrfHeaderName:te,onUploadProgress:te,onDownloadProgress:te,decompress:te,maxContentLength:te,maxBodyLength:te,beforeRedirect:te,transport:te,httpAgent:te,httpsAgent:te,cancelToken:te,socketPath:te,responseEncoding:te,validateStatus:le,headers:(Pe,ve)=>j(Ne(Pe),Ne(ve),!0)};return re.forEach(Object.keys(Object.assign({},m,A)),function(ve){const $e=Te[ve]||j,Ut=$e(m[ve],A[ve],ve);re.isUndefined(Ut)&&$e!==le||(N[ve]=Ut)}),N}var We=m=>{const A=He({},m);let{data:N,withXSRFToken:q,xsrfHeaderName:j,xsrfCookieName:Q,headers:te,auth:le}=A;A.headers=te=Me.from(te),A.url=ut(be(A.baseURL,A.url),m.params,m.paramsSerializer),le&&te.set("Authorization","Basic "+btoa((le.username||"")+":"+(le.password?unescape(encodeURIComponent(le.password)):"")));let Te;if(re.isFormData(N)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)te.setContentType(void 0);else if((Te=te.getContentType())!==!1){const[Pe,...ve]=Te?Te.split(";").map($e=>$e.trim()).filter(Boolean):[];te.setContentType([Pe||"multipart/form-data",...ve].join("; "))}}if(qe.hasStandardBrowserEnv&&(q&&re.isFunction(q)&&(q=q(A)),q||q!==!1&&se(A.url))){const Pe=j&&Q&&xe.read(Q);Pe&&te.set(j,Pe)}return A},$=typeof XMLHttpRequest<"u"&&function(m){return new Promise(function(N,q){const j=We(m);let Q=j.data;const te=Me.from(j.headers).normalize();let{responseType:le}=j,Te;function Pe(){j.cancelToken&&j.cancelToken.unsubscribe(Te),j.signal&&j.signal.removeEventListener("abort",Te)}let ve=new XMLHttpRequest;ve.open(j.method.toUpperCase(),j.url,!0),ve.timeout=j.timeout;function $e(){if(!ve)return;const Ot=Me.from("getAllResponseHeaders"in ve&&ve.getAllResponseHeaders()),it={data:!le||le==="text"||le==="json"?ve.responseText:ve.response,status:ve.status,statusText:ve.statusText,headers:Ot,config:m,request:ve};ye(function(cr){N(cr),Pe()},function(cr){q(cr),Pe()},it),ve=null}"onloadend"in ve?ve.onloadend=$e:ve.onreadystatechange=function(){!ve||ve.readyState!==4||ve.status===0&&!(ve.responseURL&&ve.responseURL.indexOf("file:")===0)||setTimeout($e)},ve.onabort=function(){ve&&(q(new Ae("Request aborted",Ae.ECONNABORTED,j,ve)),ve=null)},ve.onerror=function(){q(new Ae("Network Error",Ae.ERR_NETWORK,j,ve)),ve=null},ve.ontimeout=function(){let ze=j.timeout?"timeout of "+j.timeout+"ms exceeded":"timeout exceeded";const it=j.transitional||Et;j.timeoutErrorMessage&&(ze=j.timeoutErrorMessage),q(new Ae(ze,it.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,j,ve)),ve=null},Q===void 0&&te.setContentType(null),"setRequestHeader"in ve&&re.forEach(te.toJSON(),function(ze,it){ve.setRequestHeader(it,ze)}),re.isUndefined(j.withCredentials)||(ve.withCredentials=!!j.withCredentials),le&&le!=="json"&&(ve.responseType=j.responseType),typeof j.onDownloadProgress=="function"&&ve.addEventListener("progress",ie(j.onDownloadProgress,!0)),typeof j.onUploadProgress=="function"&&ve.upload&&ve.upload.addEventListener("progress",ie(j.onUploadProgress)),(j.cancelToken||j.signal)&&(Te=Ot=>{ve&&(q(!Ot||Ot.type?new Be(null,m,ve):Ot),ve.abort(),ve=null)},j.cancelToken&&j.cancelToken.subscribe(Te),j.signal&&(j.signal.aborted?Te():j.signal.addEventListener("abort",Te)));const Ut=Ce(j.url);if(Ut&&qe.protocols.indexOf(Ut)===-1){q(new Ae("Unsupported protocol "+Ut+":",Ae.ERR_BAD_REQUEST,m));return}ve.send(Q||null)})},lt=(m,A)=>{let N=new AbortController,q;const j=function(Te){if(!q){q=!0,te();const Pe=Te instanceof Error?Te:this.reason;N.abort(Pe instanceof Ae?Pe:new Be(Pe instanceof Error?Pe.message:Pe))}};let Q=A&&setTimeout(()=>{j(new Ae(`timeout ${A} of ms exceeded`,Ae.ETIMEDOUT))},A);const te=()=>{m&&(Q&&clearTimeout(Q),Q=null,m.forEach(Te=>{Te&&(Te.removeEventListener?Te.removeEventListener("abort",j):Te.unsubscribe(j))}),m=null)};m.forEach(Te=>Te&&Te.addEventListener&&Te.addEventListener("abort",j));const{signal:le}=N;return le.unsubscribe=te,[le,()=>{Q&&clearTimeout(Q),Q=null}]};const xt=function*(m,A){let N=m.byteLength;if(N<A){yield m;return}let q=0,j;for(;q<N;)j=q+A,yield m.slice(q,j),q=j},Xe=async function*(m,A,N){for await(const q of m)yield*xt(ArrayBuffer.isView(q)?q:await N(String(q)),A)},ft=(m,A,N,q,j)=>{const Q=Xe(m,A,j);let te=0;return new ReadableStream({type:"bytes",async pull(le){const{done:Te,value:Pe}=await Q.next();if(Te){le.close(),q();return}let ve=Pe.byteLength;N&&N(te+=ve),le.enqueue(new Uint8Array(Pe))},cancel(le){return q(le),Q.return()}},{highWaterMark:2})},st=(m,A)=>{const N=m!=null;return q=>setTimeout(()=>A({lengthComputable:N,total:m,loaded:q}))},Dt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wt=Dt&&typeof ReadableStream=="function",Rt=Dt&&(typeof TextEncoder=="function"?(m=>A=>m.encode(A))(new TextEncoder):async m=>new Uint8Array(await new Response(m).arrayBuffer())),kt=wt&&(()=>{let m=!1;const A=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!A})(),Tt=64*1024,It=wt&&!!(()=>{try{return re.isReadableStream(new Response("").body)}catch{}})(),Lt={stream:It&&(m=>m.body)};Dt&&(m=>{["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!Lt[A]&&(Lt[A]=re.isFunction(m[A])?N=>N[A]():(N,q)=>{throw new Ae(`Response type '${A}' is not supported`,Ae.ERR_NOT_SUPPORT,q)})})})(new Response);const Vt=async m=>{if(m==null)return 0;if(re.isBlob(m))return m.size;if(re.isSpecCompliantForm(m))return(await new Request(m).arrayBuffer()).byteLength;if(re.isArrayBufferView(m))return m.byteLength;if(re.isURLSearchParams(m)&&(m=m+""),re.isString(m))return(await Rt(m)).byteLength},Yt=async(m,A)=>{const N=re.toFiniteNumber(m.getContentLength());return N??Vt(A)};var ua=Dt&&(async m=>{let{url:A,method:N,data:q,signal:j,cancelToken:Q,timeout:te,onDownloadProgress:le,onUploadProgress:Te,responseType:Pe,headers:ve,withCredentials:$e="same-origin",fetchOptions:Ut}=We(m);Pe=Pe?(Pe+"").toLowerCase():"text";let[Ot,ze]=j||Q||te?lt([j,Q],te):[],it,or;const cr=()=>{!it&&setTimeout(()=>{Ot&&Ot.unsubscribe()}),it=!0};let Tr;try{if(Te&&kt&&N!=="get"&&N!=="head"&&(Tr=await Yt(ve,q))!==0){let Lr=new Request(A,{method:"POST",body:q,duplex:"half"}),r0;re.isFormData(q)&&(r0=Lr.headers.get("content-type"))&&ve.setContentType(r0),Lr.body&&(q=ft(Lr.body,Tt,st(Tr,ie(Te)),null,Rt))}re.isString($e)||($e=$e?"cors":"omit"),or=new Request(A,{...Ut,signal:Ot,method:N.toUpperCase(),headers:ve.normalize().toJSON(),body:q,duplex:"half",withCredentials:$e});let qt=await fetch(or);const y0=It&&(Pe==="stream"||Pe==="response");if(It&&(le||y0)){const Lr={};["status","statusText","headers"].forEach(Ki=>{Lr[Ki]=qt[Ki]});const r0=re.toFiniteNumber(qt.headers.get("content-length"));qt=new Response(ft(qt.body,Tt,le&&st(r0,ie(le,!0)),y0&&cr,Rt),Lr)}Pe=Pe||"text";let ya=await Lt[re.findKey(Lt,Pe)||"text"](qt,m);return!y0&&cr(),ze&&ze(),await new Promise((Lr,r0)=>{ye(Lr,r0,{data:ya,headers:Me.from(qt.headers),status:qt.status,statusText:qt.statusText,config:m,request:or})})}catch(qt){throw cr(),qt&&qt.name==="TypeError"&&/fetch/i.test(qt.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,m,or),{cause:qt.cause||qt}):Ae.from(qt,qt&&qt.code,m,or)}});const on={http:Ft,xhr:$,fetch:ua};re.forEach(on,(m,A)=>{if(m){try{Object.defineProperty(m,"name",{value:A})}catch{}Object.defineProperty(m,"adapterName",{value:A})}});const Li=m=>`- ${m}`,ha=m=>re.isFunction(m)||m===null||m===!1;var Hi={getAdapter:m=>{m=re.isArray(m)?m:[m];const{length:A}=m;let N,q;const j={};for(let Q=0;Q<A;Q++){N=m[Q];let te;if(q=N,!ha(N)&&(q=on[(te=String(N)).toLowerCase()],q===void 0))throw new Ae(`Unknown adapter '${te}'`);if(q)break;j[te||"#"+Q]=q}if(!q){const Q=Object.entries(j).map(([le,Te])=>`adapter ${le} `+(Te===!1?"is not supported by the environment":"is not available in the build"));let te=A?Q.length>1?`since :
|
|
54
|
-
`+Q.map(Li).join(`
|
|
55
|
-
`):" "+Li(Q[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+te,"ERR_NOT_SUPPORT")}return q},adapters:on};function cn(m){if(m.cancelToken&&m.cancelToken.throwIfRequested(),m.signal&&m.signal.aborted)throw new Be(null,m)}function $i(m){return cn(m),m.headers=Me.from(m.headers),m.data=De.call(m,m.transformRequest),["post","put","patch"].indexOf(m.method)!==-1&&m.headers.setContentType("application/x-www-form-urlencoded",!1),Hi.getAdapter(m.adapter||L.adapter)(m).then(function(q){return cn(m),q.data=De.call(m,m.transformResponse,q),q.headers=Me.from(q.headers),q},function(q){return we(q)||(cn(m),q&&q.response&&(q.response.data=De.call(m,m.transformResponse,q.response),q.response.headers=Me.from(q.response.headers))),Promise.reject(q)})}const Ui="1.7.2",dn={};["object","boolean","number","function","string","symbol"].forEach((m,A)=>{dn[m]=function(q){return typeof q===m||"a"+(A<1?"n ":" ")+m}});const ji={};dn.transitional=function(A,N,q){function j(Q,te){return"[Axios v"+Ui+"] Transitional option '"+Q+"'"+te+(q?". "+q:"")}return(Q,te,le)=>{if(A===!1)throw new Ae(j(te," has been removed"+(N?" in "+N:"")),Ae.ERR_DEPRECATED);return N&&!ji[te]&&(ji[te]=!0,console.warn(j(te," has been deprecated since v"+N+" and will be removed in the near future"))),A?A(Q,te,le):!0}};function la(m,A,N){if(typeof m!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const q=Object.keys(m);let j=q.length;for(;j-- >0;){const Q=q[j],te=A[Q];if(te){const le=m[Q],Te=le===void 0||te(le,Q,m);if(Te!==!0)throw new Ae("option "+Q+" must be "+Te,Ae.ERR_BAD_OPTION_VALUE);continue}if(N!==!0)throw new Ae("Unknown option "+Q,Ae.ERR_BAD_OPTION)}}var un={assertOptions:la,validators:dn};const zr=un.validators;class R0{constructor(A){this.defaults=A,this.interceptors={request:new tr,response:new tr}}async request(A,N){try{return await this._request(A,N)}catch(q){if(q instanceof Error){let j;Error.captureStackTrace?Error.captureStackTrace(j={}):j=new Error;const Q=j.stack?j.stack.replace(/^.+\n/,""):"";try{q.stack?Q&&!String(q.stack).endsWith(Q.replace(/^.+\n.+\n/,""))&&(q.stack+=`
|
|
56
|
-
`+Q):q.stack=Q}catch{}}throw q}}_request(A,N){typeof A=="string"?(N=N||{},N.url=A):N=A||{},N=He(this.defaults,N);const{transitional:q,paramsSerializer:j,headers:Q}=N;q!==void 0&&un.assertOptions(q,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),j!=null&&(re.isFunction(j)?N.paramsSerializer={serialize:j}:un.assertOptions(j,{encode:zr.function,serialize:zr.function},!0)),N.method=(N.method||this.defaults.method||"get").toLowerCase();let te=Q&&re.merge(Q.common,Q[N.method]);Q&&re.forEach(["delete","get","head","post","put","patch","common"],ze=>{delete Q[ze]}),N.headers=Me.concat(te,Q);const le=[];let Te=!0;this.interceptors.request.forEach(function(it){typeof it.runWhen=="function"&&it.runWhen(N)===!1||(Te=Te&&it.synchronous,le.unshift(it.fulfilled,it.rejected))});const Pe=[];this.interceptors.response.forEach(function(it){Pe.push(it.fulfilled,it.rejected)});let ve,$e=0,Ut;if(!Te){const ze=[$i.bind(this),void 0];for(ze.unshift.apply(ze,le),ze.push.apply(ze,Pe),Ut=ze.length,ve=Promise.resolve(N);$e<Ut;)ve=ve.then(ze[$e++],ze[$e++]);return ve}Ut=le.length;let Ot=N;for($e=0;$e<Ut;){const ze=le[$e++],it=le[$e++];try{Ot=ze(Ot)}catch(or){it.call(this,or);break}}try{ve=$i.call(this,Ot)}catch(ze){return Promise.reject(ze)}for($e=0,Ut=Pe.length;$e<Ut;)ve=ve.then(Pe[$e++],Pe[$e++]);return ve}getUri(A){A=He(this.defaults,A);const N=be(A.baseURL,A.url);return ut(N,A.params,A.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(A){R0.prototype[A]=function(N,q){return this.request(He(q||{},{method:A,url:N,data:(q||{}).data}))}}),re.forEach(["post","put","patch"],function(A){function N(q){return function(Q,te,le){return this.request(He(le||{},{method:A,headers:q?{"Content-Type":"multipart/form-data"}:{},url:Q,data:te}))}}R0.prototype[A]=N(),R0.prototype[A+"Form"]=N(!0)});var P0=R0;class hn{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(Q){N=Q});const q=this;this.promise.then(j=>{if(!q._listeners)return;let Q=q._listeners.length;for(;Q-- >0;)q._listeners[Q](j);q._listeners=null}),this.promise.then=j=>{let Q;const te=new Promise(le=>{q.subscribe(le),Q=le}).then(j);return te.cancel=function(){q.unsubscribe(Q)},te},A(function(Q,te,le){q.reason||(q.reason=new Be(Q,te,le),N(q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const N=this._listeners.indexOf(A);N!==-1&&this._listeners.splice(N,1)}static source(){let A;return{token:new hn(function(j){A=j}),cancel:A}}}var xa=hn;function pa(m){return function(N){return m.apply(null,N)}}function ba(m){return re.isObject(m)&&m.isAxiosError===!0}const ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ln).forEach(([m,A])=>{ln[A]=m});var va=ln;function Wi(m){const A=new P0(m),N=i(P0.prototype.request,A);return re.extend(N,P0.prototype,A,{allOwnKeys:!0}),re.extend(N,A,null,{allOwnKeys:!0}),N.create=function(j){return Wi(He(m,j))},N}const $t=Wi(L);return $t.Axios=P0,$t.CanceledError=Be,$t.CancelToken=xa,$t.isCancel=we,$t.VERSION=Ui,$t.toFormData=ot,$t.AxiosError=Ae,$t.Cancel=$t.CanceledError,$t.all=function(A){return Promise.all(A)},$t.spread=pa,$t.isAxiosError=ba,$t.mergeConfig=He,$t.AxiosHeaders=Me,$t.formToJSON=m=>d(re.isHTMLForm(m)?new FormData(m):m),$t.getAdapter=Hi.getAdapter,$t.HttpStatusCode=va,$t.default=$t,ti=$t,ti}var zf;function vo(){return zf||(zf=1,function(i,e){(function(t,r){i.exports=r(d0(),bo())})(Ue,function(t,r){return function(){var a=t,s=a.Util,b=a.Enc,p=a.Sign,u=a.Rpc={_default_peers:["https://main.saseul.net","https://sub.saseul.net","https://aroma.saseul.net","https://blanc.saseul.net"],_endpoints:null,_timeout:3e4,_headers:{},_broadcast_limit:32,endpoint:function(f){const o=this.endpoints(f),x=Math.floor(Math.random()*o.length);return o[x]},endpoints:function(f){return typeof f=="object"?this._endpoints=Object.values(f):typeof f<"u"&&(this._endpoints=[String(f)]),this._endpoints?this._endpoints:this._default_peers},timeout:function(f){return typeof f=="number"&&f>0&&(this._timeout=f),this._timeout},headers:function(f){return typeof f=="object"&&(this._headers=f),this._headers},broadcastLimit:function(f){return typeof f=="number"&&f>0&&(this._broadcast_limit=f),this._broadcast_limit},tracker:function(){return this.get("peer",{})},trackerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v={peers:[],known_hosts:[]};x.forEach(_=>{_.data&&_.data.peers&&_.data.known_hosts&&typeof _.data.peers=="object"&&Array.isArray(_.data.known_hosts)&&(v.peers.push(Object.values(_.data.peers)),v.known_hosts.push(_.data.known_hosts))}),v.peers.length>0?(v.peers=s.flatMerge(v.peers),v.known_hosts=s.flatMerge(v.known_hosts),f(v)):o(x)})})},peer:function(){return new Promise((f,o)=>{u.tracker().then(x=>f(Object.values(x.data.peers))).catch(o)})},peerFromAll:function(){return new Promise((f,o)=>{u.all("GET","peer",{}).then(x=>{let v=[];x.forEach(_=>{_.data&&_.data.peers&&typeof _.data.peers=="object"&&v.push(Object.values(_.data.peers))}),v.length>0?(v=s.flatMerge(v),f(v)):o(x)})})},ping:function(){return this.get("ping",{})},round:function(){return this.get("round",{chain_type:"all"})},bestRound:function(){return new Promise((f,o)=>{this.all("GET","round",{chain_type:"all"}).then(x=>{let v=x,_=Math.max(...v.map(H=>H.data?H.data.main.block.height:0)),E=Math.max(...v.map(H=>H.data?H.data.resource.block.height:0)),D=v.find(H=>H.data&&H.data.main.block.height===_),k=v.find(H=>H.data&&H.data.resource.block.height===E);!D||!k?o({main:null,resource:null}):f({main:D.data.main.block,resource:k.data.resource.block})}).catch(o)})},signedRequest:function(f,o){return this.signedData(f,o,"request")},simpleRequest:function(f){return{request:f}},signedTransaction:function(f,o){return this.signedData(f,o,"transaction")},request:function(f){return this.get("request",f)},raceRequest:function(f,o=()=>!0){return this.race("GET","request",f,o)},sendTransaction:function(f){return this.post("sendtransaction",f)},sendTransactionToAll:function(f){return this.all("POST","sendtransaction",f)},broadcastTransaction:function(f){return new Promise((o,x)=>{this.peerFromAll().then(v=>{let _=u.broadcastLimit()-u.endpoints().length,E=s.merge(u.endpoints(),s.randomSlice(v,_).map(D=>D.host));u._all(E,"POST","sendtransaction",f,()=>!0,D=>{let k=D.filter(H=>H.code===200);if(k.length>0)o(k[0]);else{let H=Math.max(...D.map(T=>T.code)),P=D.filter(T=>T.code===H);P.length>0?x(P[0]):x(D[0])}})}).catch(x)})},estimatedFee:function(f){const o=JSON.stringify(f).length;return new Promise((x,v)=>{this.race("POST","weight",f,s.isInt).then(_=>{let E=parseInt(_.data||"0"),D=E===o?(o+336)*1e9:E*1e9;x(D)}).catch(_=>{v(_)})})},get:function(f,o){return this.fetch("GET",f,o)},post:function(f,o){return this.fetch("POST",f,o)},fetch:function(f,o,x){return new Promise(function(v,_){let E=u.axiosItem(u.endpoint(),f,o,x,u.headers());r(E).then(D=>{D.data&&D.data.code?v(D.data):_({code:901,msg:"Invalid response parameter"})}).catch(D=>{D.code==="ECONNABORTED"||D.message.includes("timeout")?_({code:408,msg:"Request timed out"}):D.response&&D.response.data&&D.response.data.code?v(D.response.data):D.response.status&&D.response.statusText&&D.response.data?_({code:D.response.status,msg:D.response.statusText,data:D.response.data}):_(D)})})},signedData:function(f,o,x="transaction"){if(o||(o=t.Sign.privateKey()),!p.keyValidity(o))return console.error("Invalid private key: "+o),{};let v={};return f.from=p.address(p.publicKey(o)),typeof f.timestamp!="number"&&(f.timestamp=s.utime()+(x==="transaction"?2e6:0)),v[x]=f,v.public_key=p.publicKey(o),v.signature=p.signature(b.txHash(f),o),v},axiosItem:function(f,o,x,v,_){let E={method:o,url:`${s.wrappedEndpoint(f)}/${x}`,timeout:u.timeout()};if(typeof _=="object"&&Object.keys(_).length>0&&(E.headers=_),o==="GET"){let D=[];for(let k in v)D.push(`${k}=${s.string(v[k])}`);E.url=E.url+(Object.keys(v).length===0?"":"?"+D.join("&"))}else{let D=new FormData;for(let k in v)D.set(k,s.string(v[k]));E.data=D}return E},race:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E,D){u._race(_,f,o,x,v,E,D)})},_race:function(f,o,x,v,_=()=>!1,E=()=>{},D=()=>{}){(!Array.isArray(f)||f.length===0)&&D();try{let k=0,H,P,T,z=new r.CancelToken(Y=>T=Y),V=f.map(Y=>{P=u.axiosItem(Y,o,x,v,u.headers()),P.cancelToken=z,r(P).then(Z=>{Z.data&&Z.data.code&&_(Z.data.data)?(E(Z.data),T()):k++}).catch(Z=>{k++,H||(Z.code==="ECONNABORTED"||Z.message.includes("timeout")?H={code:408,msg:"Request timed out"}:Z.response&&Z.response.data&&Z.response.data.code?H=Z.response.data:Z.response&&Z.response.status?H={code:Z.response.status,msg:Z.response.statusText,data:Z.response.data}:H=Z)}).finally(()=>k>=f.length&&D(H))});Promise.race(V).then()}catch(k){console.error(k)}},all:function(f,o,x,v=()=>!0){const _=this.endpoints();return new Promise(function(E){u._all(_,f,o,x,v,E)})},_all:function(f,o,x,v,_=()=>!0,E=()=>{}){(!Array.isArray(f)||f.length===0)&&fallback();try{let D=[],k,H=f.map(P=>{k=u.axiosItem(P,o,x,v,u.headers()),r(k).then(T=>{T.data&&T.data.code&&_(T.data.data)?D.push({endpoint:P,code:T.data.code,data:T.data.data}):D.push({endpoint:P,msg:"Condition not met"})}).catch(T=>{if(T.code==="ECONNABORTED"||T.message.includes("timeout"))D.push({endpoint:P,code:408,msg:"Request timed out"});else if(T.response&&T.response.data&&T.response.data.code){let z=T.response.data;z.endpoint=P,D.push(z)}else T.response&&T.response.status?D.push({endpoint:P,code:T.response.status,msg:T.response.statusText,data:T.response.data}):D.push({endpoint:P,error:T})}).finally(()=>{D.length>=f.length&&E(D)})});Promise.race(H).then()}catch(D){console.error(D)}}}}(),t.Rpc})}(ei)),ei.exports}var ri={exports:{}},Lf;function yo(){return Lf||(Lf=1,function(i,e){(function(t,r){i.exports=r(d0())})(Ue,function(t){return function(){var r=t,a=t.Util,s=t.Enc,b=t.Sign,p=t.Rpc,u=r.SmartContract={ZERO_ADDRESS:"00000000000000000000000000000000000000000000",Operator:{legacy_condition:function(f,o="Conditional error"){return[f,o]},condition:function(f,o="Conditional error"){return{$condition:[f,o]}},response:function(f){return{$response:[f]}},weight:function(){return{$weight:[]}},if:function(f=!1,o=null,x=null){return{$if:[f,o,x]}},and:function(f=[]){return{$and:f}},or:function(f=[]){return{$or:f}},get:function(f={},o=""){return{$get:[f,o]}},add:function(f=[]){return{$add:f}},sub:function(f=[]){return{$sub:f}},mul:function(f=[]){return{$mul:f}},div:function(f=[]){return{$div:f}},precise_add:function(f=null,o=null,x=0){return{$precise_add:[f,o,x]}},precise_sub:function(f=null,o=null,x=0){return{$precise_sub:[f,o,x]}},precise_mul:function(f=null,o=null,x=0){return{$precise_mul:[f,o,x]}},precise_div:function(f=null,o=null,x=0){return{$precise_div:[f,o,x]}},scale:function(f=null){return{$scale:[f]}},get_type:function(f){return{$get_type:[f]}},is_numeric:function(f=[]){return{$is_numeric:f}},is_int:function(f=[]){return{$is_int:f}},is_string:function(f=[]){return{$is_string:f}},is_null:function(f=[]){return{$is_null:f}},is_bool:function(f=[]){return{$is_bool:f}},is_array:function(f=[]){return{$is_array:f}},is_double:function(f=[]){return{$is_double:f}},eq:function(f=0,o=0){return{$eq:[f,o]}},ne:function(f=0,o=0){return{$ne:[f,o]}},gt:function(f=0,o=0){return{$gt:[f,o]}},lt:function(f=0,o=0){return{$lt:[f,o]}},gte:function(f=0,o=0){return{$gte:[f,o]}},lte:function(f=0,o=0){return{$lte:[f,o]}},in:function(f=null,o=[]){return{$in:[f,o]}},load_param:function(f){return typeof f=="string"?{$load_param:[f]}:{$load_param:f}},read_universal:function(f=null,o=null,x=null){return{$read_universal:[f,o,x]}},read_local:function(f=null,o=null,x=null){return{$read_local:[f,o,x]}},write_universal:function(f=null,o=null,x=null){return{$write_universal:[f,o,x]}},write_local:function(f=null,o=null,x=null){return{$write_local:[f,o,x]}},concat:function(f=[]){return{$concat:f}},strlen:function(f=""){return{$strlen:[f]}},reg_match:function(f=null,o=""){return{$reg_match:[f,o]}},encode_json:function(f=null){return{$encode_json:[f]}},decode_json:function(f=""){return{$decode_json:[f]}},hash:function(f=[]){return{$hash:[f]}},short_hash:function(f=[]){return{$short_hash:[f]}},id_hash:function(f=[]){return{$id_hash:[f]}},sign_verify:function(f=null,o="",x=""){return{$sign_verify:[f,o,x]}},get_block:function(f,o){return{$get_block:[f,o]}},get_resource_block:function(f,o){return{$get_resource_block:[f,o]}},get_transaction:function(f){return{$get_transaction:[f]}},list_universal:function(f,o,x){return{$list_universal:[f,o,x]}}},Contract:function(f,o){this._methods={},this._writer=f,this._nonce=o,this.method=function(x){return this._methods[x]},this.writer=function(x){typeof x<"u"&&(typeof x=="string"&&(b.addressValidity(x)||x===s.ZERO_ADDRESS)?this._writer=x:console.error("Invalid writer address. "))},this.nonce=function(x){typeof x<"u"&&(typeof x=="string"?this._nonce=x:console.error("The 'nonce' parameter should be of string."))},this.methods=function(x=!1){let v={};if(x)for(let _ in this._methods)v[_]=this._methods[_].compile();else for(let _ in this._methods)v[_]=this._methods[_].type();return v},this.addMethod=function(x){x.writer(this._writer),x.nonce(this._nonce),this._methods[x.name()]=x},this.publish=function(x){this.register(x,"Publish")},this.register=function(x,v="Register"){let _=function(E){let D=a.utime()+1e6,k={type:v,code:E.compile(),timestamp:D},H=s.txHash(k),P=p.signedTransaction(k,x),T=function(){console.log("Checking results... "+H),p.round().then(function(z){typeof z.data<"u"&&z.data.main.block.s_timestamp>D?p.request(p.signedRequest({type:"GetCode",ctype:E.type(),target:E.mid()}),b.privateKey()).then(function(V){for(let Y in V.data)V.data[Y]===null?(console.log("Failed. Resending code... "+H),_(E)):console.log("Success! "+H)}):setTimeout(T,2e3)})};p.broadcastTransaction(P).then(function(z){z.code===200?(console.log(z.data),setTimeout(T,2e3)):z.code!==999?(console.log("Failed. Resending code... "+H),_(E)):console.dir(z)}).catch(function(z){console.dir(z)})};for(let E in this._methods)_(this._methods[E])}},Method:function(f){this._type="request",this._machine="0.2.0",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._executions=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.t<"u"&&(typeof f.t=="string"&&f.t==="contract"?this._type="contract":this._type="request"),typeof f.machine<"u"&&(typeof f.machine=="string"?this._machine=f.machine:console.error("The 'machine' parameter should be of string.")),typeof f.m<"u"&&(typeof f.m=="string"?this._machine=f.m:console.error("The 'machine' parameter should be of string.")),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.n<"u"&&(typeof f.n=="string"?this._name=f.n:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.v<"u"&&(typeof f.v=="string"?this._version=f.v:console.error("The 'version' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.s<"u"&&(typeof f.s=="string"?this._space=f.s:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.w<"u"&&(typeof f.w=="string"&&(b.addressValidity(f.w)||f.w===s.ZERO_ADDRESS)?this._writer=f.w:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.p<"u"&&(typeof f.p=="object"&&u.parametersValidity(f.p)?this._parameters=f.p:console.error("Invalid parameters. ")),typeof f.executions<"u"&&(typeof f.executions=="object"?this._executions=f.executions:console.error("Invalid executions. ")),typeof f.e<"u"&&(typeof f.e=="object"?this._executions=f.e:console.error("Invalid executions. "))),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.hash([this.writer(),this.space(),this.name()])},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.machine=function(o){return typeof o<"u"&&(typeof o=="string"?this._machine=o:console.error("The 'machine' parameter should be of string.")),this._machine},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'space' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.executions=function(o){return typeof o=="object"&&(this._executions=o),this._executions},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addExecution=function(o){this._executions.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),o=JSON.stringify({t:this._type,m:this._machine,n:this._name,v:this._version,s:this._space,w:this._writer,p:this._parameters,e:this._executions}),o.replaceAll("/","\\/")}},LegacyMethod:function(f){this._type="request",this._name="",this._version="",this._space="",this._writer="",this._parameters={},this._conditions=[],this._updates=[],this._response=[],typeof f=="object"&&(typeof f.type<"u"&&(typeof f.type=="string"&&f.type==="contract"?this._type="contract":this._type="request"),typeof f.name<"u"&&(typeof f.name=="string"?this._name=f.name:console.error("The 'name' parameter should be of string.")),typeof f.version<"u"&&(typeof f.version=="string"?this._version=f.version:console.error("The 'version' parameter should be of string.")),typeof f.nonce<"u"&&(typeof f.nonce=="string"?this._space=f.nonce:console.error("The 'space' parameter should be of string.")),typeof f.space<"u"&&(typeof f.space=="string"?this._space=f.space:console.error("The 'space' parameter should be of string.")),typeof f.writer<"u"&&(typeof f.writer=="string"&&(b.addressValidity(f.writer)||f.writer===s.ZERO_ADDRESS)?this._writer=f.writer:console.error("Invalid writer address. ")),typeof f.parameters<"u"&&(typeof f.parameters=="object"&&u.parametersValidity(f.parameters)?this._parameters=f.parameters:console.error("Invalid parameters. ")),typeof f.conditions<"u"&&(typeof f.conditions=="object"?this._conditions=f.conditions:console.error("Invalid conditions. ")),typeof f.updates<"u"&&(typeof f.updates=="object"?this._updates=f.updates:console.error("Invalid updates. ")),typeof f.response<"u"&&(this._response=f.response)),this.cid=function(){return s.cid(this.writer(),this.space())},this.mid=function(){return s.idHash([this.name(),this.space()])+"00000000000000000000"},this.type=function(o){return typeof o<"u"&&(o==="contract"?this._type="contract":this._type="request"),this._type},this.name=function(o){return typeof o<"u"&&(typeof o=="string"?this._name=o:console.error("The 'name' parameter should be of string.")),this._name},this.version=function(o){return typeof o<"u"&&(typeof o=="string"?this._version=o:console.error("The 'version' parameter should be of string.")),this._version},this.nonce=function(o){return typeof o<"u"&&(typeof o=="string"?this._space=o:console.error("The 'nonce' parameter should be of string.")),this._space},this.space=function(o){return this.nonce(o)},this.writer=function(o){return typeof o<"u"&&(b.addressValidity(o)||o===s.ZERO_ADDRESS?this._writer=o:console.error("Invalid writer address. ")),this._writer},this.parameters=function(o){return typeof o<"u"&&(typeof o=="object"&&u.parametersValidity(o)?this._parameters=o:console.error("Invalid parameters. ")),this._parameters},this.conditions=function(o){return typeof o=="object"&&(this._conditions=o),this._conditions},this.updates=function(o){return typeof o=="object"&&(this._updates=o),this._updates},this.response=function(o){return typeof o<"u"&&(this._response=o),this._response},this.addParameter=function(o){typeof o.default>"u"&&(o.default=null),typeof o.cases>"u"&&(o.cases=null),typeof o=="object"&&u.parameterValidity(o)?this._parameters[o.name]=o:console.error("Invalid parameter. ")},this.addCondition=function(o){this._conditions.push(o)},this.addUpdate=function(o){this._updates.push(o)},this.compile=function(){let o;return Object.keys(this._parameters).length===0&&(this._parameters=[]),this._type==="contract"?o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,updates:this._updates}):o=JSON.stringify({type:this._type,name:this._name,version:this._version,nonce:this._space,writer:this._writer,parameters:this._parameters,conditions:this._conditions,response:this._response}),o.replaceAll("/","\\/")}},parametersValidity(f){for(let o in f)if(this.parameterValidity(f[o])===!1)return!1;return!0},parameterValidity(f){let o=!1,x=!1,v=!1,_=!1,E=!1;return typeof f.name=="string"?o=!0:o=!1,typeof f.type=="string"&&u.typeValidity(f.type)?x=!0:x=!1,typeof f.maxlength=="number"?v=!0:v=!1,typeof f.requirements=="boolean"?_=!0:_=!1,typeof f.cases>"u"||typeof f.cases=="object"||f.cases===null?E=!0:E=!1,o&&x&&v&&_&&E},typeValidity(f){return f==="string"||f==="int"||f==="array"||f==="bool"||f==="double"||f==="any"}}}(),t.SmartContract})}(ri)),ri.exports}(function(i,e){(function(t,r){i.exports=r(d0(),qa(),lo(),po(),vo(),yo())})(Ue,function(t){return t})})(xs);var gs=xs.exports;const _s=as(gs),mo=Ea({__proto__:null,default:_s},[gs]);var Es={};const go="elliptic",_o="6.5.5",Eo="EC cryptography",wo="lib/elliptic.js",Ao=["lib"],Bo={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},Co={type:"git",url:"git@github.com:indutny/elliptic"},So=["EC","Elliptic","curve","Cryptography"],Fo="Fedor Indutny <fedor@indutny.com>",Mo="MIT",Do={url:"https://github.com/indutny/elliptic/issues"},Ro="https://github.com/indutny/elliptic",Po={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},To={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},ko={name:go,version:_o,description:Eo,main:wo,files:Ao,scripts:Bo,repository:Co,keywords:So,author:Fo,license:Mo,bugs:Do,homepage:Ro,devDependencies:Po,dependencies:To};var xr={},Si={exports:{}};Si.exports;(function(i){(function(e,t){function r(S,c){if(!S)throw new Error(c||"Assertion failed")}function a(S,c){S.super_=c;var h=function(){};h.prototype=c.prototype,S.prototype=new h,S.prototype.constructor=S}function s(S,c,h){if(s.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((c==="le"||c==="be")&&(h=c,c=10),this._init(S||0,c||10,h||"be"))}typeof e=="object"?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var b;try{typeof window<"u"&&typeof window.Buffer<"u"?b=window.Buffer:b=V0.Buffer}catch{}s.isBN=function(c){return c instanceof s?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===s.wordSize&&Array.isArray(c.words)},s.max=function(c,h){return c.cmp(h)>0?c:h},s.min=function(c,h){return c.cmp(h)<0?c:h},s.prototype._init=function(c,h,w){if(typeof c=="number")return this._initNumber(c,h,w);if(typeof c=="object")return this._initArray(c,h,w);h==="hex"&&(h=16),r(h===(h|0)&&h>=2&&h<=36),c=c.toString().replace(/\s+/g,"");var M=0;c[0]==="-"&&(M++,this.negative=1),M<c.length&&(h===16?this._parseHex(c,M,w):(this._parseBase(c,h,M),w==="le"&&this._initArray(this.toArray(),h,w)))},s.prototype._initNumber=function(c,h,w){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),h,w)},s.prototype._initArray=function(c,h,w){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O,U,W=0;if(w==="be")for(M=c.length-1,O=0;M>=0;M-=3)U=c[M]|c[M-1]<<8|c[M-2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);else if(w==="le")for(M=0,O=0;M<c.length;M+=3)U=c[M]|c[M+1]<<8|c[M+2]<<16,this.words[O]|=U<<W&67108863,this.words[O+1]=U>>>26-W&67108863,W+=24,W>=26&&(W-=26,O++);return this.strip()};function p(S,c){var h=S.charCodeAt(c);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function u(S,c,h){var w=p(S,h);return h-1>=c&&(w|=p(S,h-1)<<4),w}s.prototype._parseHex=function(c,h,w){this.length=Math.ceil((c.length-h)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var O=0,U=0,W;if(w==="be")for(M=c.length-1;M>=h;M-=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8;else{var I=c.length-h;for(M=I%2===0?h+1:h;M<c.length;M+=2)W=u(c,h,M)<<O,this.words[U]|=W&67108863,O>=18?(O-=18,U+=1,this.words[U]|=W>>>26):O+=8}this.strip()};function f(S,c,h,w){for(var M=0,O=Math.min(S.length,h),U=c;U<O;U++){var W=S.charCodeAt(U)-48;M*=w,W>=49?M+=W-49+10:W>=17?M+=W-17+10:M+=W}return M}s.prototype._parseBase=function(c,h,w){this.words=[0],this.length=1;for(var M=0,O=1;O<=67108863;O*=h)M++;M--,O=O/h|0;for(var U=c.length-w,W=U%M,I=Math.min(U,U-W)+w,l=0,F=w;F<I;F+=M)l=f(c,F,F+M,h),this.imuln(O),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(W!==0){var ee=1;for(l=f(c,F,c.length,h),F=0;F<W;F++)ee*=h;this.imuln(ee),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var h=0;h<this.length;h++)c.words[h]=this.words[h];c.length=this.length,c.negative=this.negative,c.red=this.red},s.prototype.clone=function(){var c=new s(null);return this.copy(c),c},s.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var o=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(c,h){c=c||10,h=h|0||1;var w;if(c===16||c==="hex"){w="";for(var M=0,O=0,U=0;U<this.length;U++){var W=this.words[U],I=((W<<M|O)&16777215).toString(16);O=W>>>24-M&16777215,O!==0||U!==this.length-1?w=o[6-I.length]+I+w:w=I+w,M+=2,M>=26&&(M-=26,U--)}for(O!==0&&(w=O.toString(16)+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(c===(c|0)&&c>=2&&c<=36){var l=x[c],F=v[c];w="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var J=ee.modn(F).toString(c);ee=ee.idivn(F),ee.isZero()?w=J+w:w=o[l-J.length]+J+w}for(this.isZero()&&(w="0"+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(c,h){return r(typeof b<"u"),this.toArrayLike(b,c,h)},s.prototype.toArray=function(c,h){return this.toArrayLike(Array,c,h)},s.prototype.toArrayLike=function(c,h,w){var M=this.byteLength(),O=w||Math.max(1,M);r(M<=O,"byte array longer than desired length"),r(O>0,"Requested array length <= 0"),this.strip();var U=h==="le",W=new c(O),I,l,F=this.clone();if(U){for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[l]=I;for(;l<O;l++)W[l]=0}else{for(l=0;l<O-M;l++)W[l]=0;for(l=0;!F.isZero();l++)I=F.andln(255),F.iushrn(8),W[O-l-1]=I}return W},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var h=c,w=0;return h>=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(c){if(c===0)return 26;var h=c,w=0;return h&8191||(w+=13,h>>>=13),h&127||(w+=7,h>>>=7),h&15||(w+=4,h>>>=4),h&3||(w+=2,h>>>=2),h&1||w++,w},s.prototype.bitLength=function(){var c=this.words[this.length-1],h=this._countBits(c);return(this.length-1)*26+h};function _(S){for(var c=new Array(S.bitLength()),h=0;h<c.length;h++){var w=h/26|0,M=h%26;c[h]=(S.words[w]&1<<M)>>>M}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,h=0;h<this.length;h++){var w=this._zeroBits(this.words[h]);if(c+=w,w!==26)break}return c},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},s.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var h=0;h<c.length;h++)this.words[h]=this.words[h]|c.words[h];return this.strip()},s.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},s.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},s.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},s.prototype.iuand=function(c){var h;this.length>c.length?h=c:h=this;for(var w=0;w<h.length;w++)this.words[w]=this.words[w]&c.words[w];return this.length=h.length,this.strip()},s.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},s.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},s.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},s.prototype.iuxor=function(c){var h,w;this.length>c.length?(h=this,w=c):(h=c,w=this);for(var M=0;M<w.length;M++)this.words[M]=h.words[M]^w.words[M];if(this!==h)for(;M<h.length;M++)this.words[M]=h.words[M];return this.length=h.length,this.strip()},s.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},s.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},s.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},s.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var h=Math.ceil(c/26)|0,w=c%26;this._expand(h),w>0&&h--;for(var M=0;M<h;M++)this.words[M]=~this.words[M]&67108863;return w>0&&(this.words[M]=~this.words[M]&67108863>>26-w),this.strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,h){r(typeof c=="number"&&c>=0);var w=c/26|0,M=c%26;return this._expand(w+1),h?this.words[w]=this.words[w]|1<<M:this.words[w]=this.words[w]&~(1<<M),this.strip()},s.prototype.iadd=function(c){var h;if(this.negative!==0&&c.negative===0)return this.negative=0,h=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,h=this.isub(c),c.negative=1,h._normSign();var w,M;this.length>c.length?(w=this,M=c):(w=c,M=this);for(var O=0,U=0;U<M.length;U++)h=(w.words[U]|0)+(M.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;for(;O!==0&&U<w.length;U++)h=(w.words[U]|0)+O,this.words[U]=h&67108863,O=h>>>26;if(this.length=w.length,O!==0)this.words[this.length]=O,this.length++;else if(w!==this)for(;U<w.length;U++)this.words[U]=w.words[U];return this},s.prototype.add=function(c){var h;return c.negative!==0&&this.negative===0?(c.negative=0,h=this.sub(c),c.negative^=1,h):c.negative===0&&this.negative!==0?(this.negative=0,h=c.sub(this),this.negative=1,h):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},s.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var h=this.iadd(c);return c.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var w=this.cmp(c);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,O;w>0?(M=this,O=c):(M=c,O=this);for(var U=0,W=0;W<O.length;W++)h=(M.words[W]|0)-(O.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;for(;U!==0&&W<M.length;W++)h=(M.words[W]|0)+U,U=h>>26,this.words[W]=h&67108863;if(U===0&&W<M.length&&M!==this)for(;W<M.length;W++)this.words[W]=M.words[W];return this.length=Math.max(this.length,W),M!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function E(S,c,h){h.negative=c.negative^S.negative;var w=S.length+c.length|0;h.length=w,w=w-1|0;var M=S.words[0]|0,O=c.words[0]|0,U=M*O,W=U&67108863,I=U/67108864|0;h.words[0]=W;for(var l=1;l<w;l++){for(var F=I>>>26,ee=I&67108863,J=Math.min(l,c.length-1),G=Math.max(0,l-S.length+1);G<=J;G++){var he=l-G|0;M=S.words[he]|0,O=c.words[G]|0,U=M*O+ee,F+=U/67108864|0,ee=U&67108863}h.words[l]=ee|0,I=F|0}return I!==0?h.words[l]=I|0:h.length--,h.strip()}var D=function(c,h,w){var M=c.words,O=h.words,U=w.words,W=0,I,l,F,ee=M[0]|0,J=ee&8191,G=ee>>>13,he=M[1]|0,_e=he&8191,Le=he>>>13,Ie=M[2]|0,je=Ie&8191,Ke=Ie>>>13,dr=M[3]|0,at=dr&8191,Je=dr>>>13,Nt=M[4]|0,vt=Nt&8191,rt=Nt>>>13,nr=M[5]|0,dt=nr&8191,Qe=nr>>>13,Qt=M[6]|0,et=Qt&8191,Ve=Qt>>>13,Kt=M[7]|0,re=Kt&8191,Ae=Kt>>>13,Ht=M[8]|0,tt=Ht&8191,Ft=Ht>>>13,sr=M[9]|0,At=sr&8191,nt=sr>>>13,ir=O[0]|0,Bt=ir&8191,ot=ir>>>13,er=O[1]|0,yt=er&8191,gt=er>>>13,ar=O[2]|0,ut=ar&8191,_t=ar>>>13,tr=O[3]|0,Et=tr&8191,Mt=tr>>>13,Wt=O[4]|0,mt=Wt&8191,ht=Wt>>>13,ur=O[5]|0,Ct=ur&8191,St=ur>>>13,wr=O[6]|0,Ze=wr&8191,qe=wr>>>13,y=O[7]|0,C=y&8191,B=y>>>13,d=O[8]|0,R=d&8191,g=d>>>13,L=O[9]|0,K=L&8191,ne=L>>>13;w.negative=c.negative^h.negative,w.length=19,I=Math.imul(J,Bt),l=Math.imul(J,ot),l=l+Math.imul(G,Bt)|0,F=Math.imul(G,ot);var pe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(pe>>>26)|0,pe&=67108863,I=Math.imul(_e,Bt),l=Math.imul(_e,ot),l=l+Math.imul(Le,Bt)|0,F=Math.imul(Le,ot),I=I+Math.imul(J,yt)|0,l=l+Math.imul(J,gt)|0,l=l+Math.imul(G,yt)|0,F=F+Math.imul(G,gt)|0;var de=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(de>>>26)|0,de&=67108863,I=Math.imul(je,Bt),l=Math.imul(je,ot),l=l+Math.imul(Ke,Bt)|0,F=Math.imul(Ke,ot),I=I+Math.imul(_e,yt)|0,l=l+Math.imul(_e,gt)|0,l=l+Math.imul(Le,yt)|0,F=F+Math.imul(Le,gt)|0,I=I+Math.imul(J,ut)|0,l=l+Math.imul(J,_t)|0,l=l+Math.imul(G,ut)|0,F=F+Math.imul(G,_t)|0;var ge=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ge>>>26)|0,ge&=67108863,I=Math.imul(at,Bt),l=Math.imul(at,ot),l=l+Math.imul(Je,Bt)|0,F=Math.imul(Je,ot),I=I+Math.imul(je,yt)|0,l=l+Math.imul(je,gt)|0,l=l+Math.imul(Ke,yt)|0,F=F+Math.imul(Ke,gt)|0,I=I+Math.imul(_e,ut)|0,l=l+Math.imul(_e,_t)|0,l=l+Math.imul(Le,ut)|0,F=F+Math.imul(Le,_t)|0,I=I+Math.imul(J,Et)|0,l=l+Math.imul(J,Mt)|0,l=l+Math.imul(G,Et)|0,F=F+Math.imul(G,Mt)|0;var ue=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ue>>>26)|0,ue&=67108863,I=Math.imul(vt,Bt),l=Math.imul(vt,ot),l=l+Math.imul(rt,Bt)|0,F=Math.imul(rt,ot),I=I+Math.imul(at,yt)|0,l=l+Math.imul(at,gt)|0,l=l+Math.imul(Je,yt)|0,F=F+Math.imul(Je,gt)|0,I=I+Math.imul(je,ut)|0,l=l+Math.imul(je,_t)|0,l=l+Math.imul(Ke,ut)|0,F=F+Math.imul(Ke,_t)|0,I=I+Math.imul(_e,Et)|0,l=l+Math.imul(_e,Mt)|0,l=l+Math.imul(Le,Et)|0,F=F+Math.imul(Le,Mt)|0,I=I+Math.imul(J,mt)|0,l=l+Math.imul(J,ht)|0,l=l+Math.imul(G,mt)|0,F=F+Math.imul(G,ht)|0;var Se=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Se>>>26)|0,Se&=67108863,I=Math.imul(dt,Bt),l=Math.imul(dt,ot),l=l+Math.imul(Qe,Bt)|0,F=Math.imul(Qe,ot),I=I+Math.imul(vt,yt)|0,l=l+Math.imul(vt,gt)|0,l=l+Math.imul(rt,yt)|0,F=F+Math.imul(rt,gt)|0,I=I+Math.imul(at,ut)|0,l=l+Math.imul(at,_t)|0,l=l+Math.imul(Je,ut)|0,F=F+Math.imul(Je,_t)|0,I=I+Math.imul(je,Et)|0,l=l+Math.imul(je,Mt)|0,l=l+Math.imul(Ke,Et)|0,F=F+Math.imul(Ke,Mt)|0,I=I+Math.imul(_e,mt)|0,l=l+Math.imul(_e,ht)|0,l=l+Math.imul(Le,mt)|0,F=F+Math.imul(Le,ht)|0,I=I+Math.imul(J,Ct)|0,l=l+Math.imul(J,St)|0,l=l+Math.imul(G,Ct)|0,F=F+Math.imul(G,St)|0;var Ee=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,I=Math.imul(et,Bt),l=Math.imul(et,ot),l=l+Math.imul(Ve,Bt)|0,F=Math.imul(Ve,ot),I=I+Math.imul(dt,yt)|0,l=l+Math.imul(dt,gt)|0,l=l+Math.imul(Qe,yt)|0,F=F+Math.imul(Qe,gt)|0,I=I+Math.imul(vt,ut)|0,l=l+Math.imul(vt,_t)|0,l=l+Math.imul(rt,ut)|0,F=F+Math.imul(rt,_t)|0,I=I+Math.imul(at,Et)|0,l=l+Math.imul(at,Mt)|0,l=l+Math.imul(Je,Et)|0,F=F+Math.imul(Je,Mt)|0,I=I+Math.imul(je,mt)|0,l=l+Math.imul(je,ht)|0,l=l+Math.imul(Ke,mt)|0,F=F+Math.imul(Ke,ht)|0,I=I+Math.imul(_e,Ct)|0,l=l+Math.imul(_e,St)|0,l=l+Math.imul(Le,Ct)|0,F=F+Math.imul(Le,St)|0,I=I+Math.imul(J,Ze)|0,l=l+Math.imul(J,qe)|0,l=l+Math.imul(G,Ze)|0,F=F+Math.imul(G,qe)|0;var Fe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,I=Math.imul(re,Bt),l=Math.imul(re,ot),l=l+Math.imul(Ae,Bt)|0,F=Math.imul(Ae,ot),I=I+Math.imul(et,yt)|0,l=l+Math.imul(et,gt)|0,l=l+Math.imul(Ve,yt)|0,F=F+Math.imul(Ve,gt)|0,I=I+Math.imul(dt,ut)|0,l=l+Math.imul(dt,_t)|0,l=l+Math.imul(Qe,ut)|0,F=F+Math.imul(Qe,_t)|0,I=I+Math.imul(vt,Et)|0,l=l+Math.imul(vt,Mt)|0,l=l+Math.imul(rt,Et)|0,F=F+Math.imul(rt,Mt)|0,I=I+Math.imul(at,mt)|0,l=l+Math.imul(at,ht)|0,l=l+Math.imul(Je,mt)|0,F=F+Math.imul(Je,ht)|0,I=I+Math.imul(je,Ct)|0,l=l+Math.imul(je,St)|0,l=l+Math.imul(Ke,Ct)|0,F=F+Math.imul(Ke,St)|0,I=I+Math.imul(_e,Ze)|0,l=l+Math.imul(_e,qe)|0,l=l+Math.imul(Le,Ze)|0,F=F+Math.imul(Le,qe)|0,I=I+Math.imul(J,C)|0,l=l+Math.imul(J,B)|0,l=l+Math.imul(G,C)|0,F=F+Math.imul(G,B)|0;var ke=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ke>>>26)|0,ke&=67108863,I=Math.imul(tt,Bt),l=Math.imul(tt,ot),l=l+Math.imul(Ft,Bt)|0,F=Math.imul(Ft,ot),I=I+Math.imul(re,yt)|0,l=l+Math.imul(re,gt)|0,l=l+Math.imul(Ae,yt)|0,F=F+Math.imul(Ae,gt)|0,I=I+Math.imul(et,ut)|0,l=l+Math.imul(et,_t)|0,l=l+Math.imul(Ve,ut)|0,F=F+Math.imul(Ve,_t)|0,I=I+Math.imul(dt,Et)|0,l=l+Math.imul(dt,Mt)|0,l=l+Math.imul(Qe,Et)|0,F=F+Math.imul(Qe,Mt)|0,I=I+Math.imul(vt,mt)|0,l=l+Math.imul(vt,ht)|0,l=l+Math.imul(rt,mt)|0,F=F+Math.imul(rt,ht)|0,I=I+Math.imul(at,Ct)|0,l=l+Math.imul(at,St)|0,l=l+Math.imul(Je,Ct)|0,F=F+Math.imul(Je,St)|0,I=I+Math.imul(je,Ze)|0,l=l+Math.imul(je,qe)|0,l=l+Math.imul(Ke,Ze)|0,F=F+Math.imul(Ke,qe)|0,I=I+Math.imul(_e,C)|0,l=l+Math.imul(_e,B)|0,l=l+Math.imul(Le,C)|0,F=F+Math.imul(Le,B)|0,I=I+Math.imul(J,R)|0,l=l+Math.imul(J,g)|0,l=l+Math.imul(G,R)|0,F=F+Math.imul(G,g)|0;var Oe=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,I=Math.imul(At,Bt),l=Math.imul(At,ot),l=l+Math.imul(nt,Bt)|0,F=Math.imul(nt,ot),I=I+Math.imul(tt,yt)|0,l=l+Math.imul(tt,gt)|0,l=l+Math.imul(Ft,yt)|0,F=F+Math.imul(Ft,gt)|0,I=I+Math.imul(re,ut)|0,l=l+Math.imul(re,_t)|0,l=l+Math.imul(Ae,ut)|0,F=F+Math.imul(Ae,_t)|0,I=I+Math.imul(et,Et)|0,l=l+Math.imul(et,Mt)|0,l=l+Math.imul(Ve,Et)|0,F=F+Math.imul(Ve,Mt)|0,I=I+Math.imul(dt,mt)|0,l=l+Math.imul(dt,ht)|0,l=l+Math.imul(Qe,mt)|0,F=F+Math.imul(Qe,ht)|0,I=I+Math.imul(vt,Ct)|0,l=l+Math.imul(vt,St)|0,l=l+Math.imul(rt,Ct)|0,F=F+Math.imul(rt,St)|0,I=I+Math.imul(at,Ze)|0,l=l+Math.imul(at,qe)|0,l=l+Math.imul(Je,Ze)|0,F=F+Math.imul(Je,qe)|0,I=I+Math.imul(je,C)|0,l=l+Math.imul(je,B)|0,l=l+Math.imul(Ke,C)|0,F=F+Math.imul(Ke,B)|0,I=I+Math.imul(_e,R)|0,l=l+Math.imul(_e,g)|0,l=l+Math.imul(Le,R)|0,F=F+Math.imul(Le,g)|0,I=I+Math.imul(J,K)|0,l=l+Math.imul(J,ne)|0,l=l+Math.imul(G,K)|0,F=F+Math.imul(G,ne)|0;var Me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Me>>>26)|0,Me&=67108863,I=Math.imul(At,yt),l=Math.imul(At,gt),l=l+Math.imul(nt,yt)|0,F=Math.imul(nt,gt),I=I+Math.imul(tt,ut)|0,l=l+Math.imul(tt,_t)|0,l=l+Math.imul(Ft,ut)|0,F=F+Math.imul(Ft,_t)|0,I=I+Math.imul(re,Et)|0,l=l+Math.imul(re,Mt)|0,l=l+Math.imul(Ae,Et)|0,F=F+Math.imul(Ae,Mt)|0,I=I+Math.imul(et,mt)|0,l=l+Math.imul(et,ht)|0,l=l+Math.imul(Ve,mt)|0,F=F+Math.imul(Ve,ht)|0,I=I+Math.imul(dt,Ct)|0,l=l+Math.imul(dt,St)|0,l=l+Math.imul(Qe,Ct)|0,F=F+Math.imul(Qe,St)|0,I=I+Math.imul(vt,Ze)|0,l=l+Math.imul(vt,qe)|0,l=l+Math.imul(rt,Ze)|0,F=F+Math.imul(rt,qe)|0,I=I+Math.imul(at,C)|0,l=l+Math.imul(at,B)|0,l=l+Math.imul(Je,C)|0,F=F+Math.imul(Je,B)|0,I=I+Math.imul(je,R)|0,l=l+Math.imul(je,g)|0,l=l+Math.imul(Ke,R)|0,F=F+Math.imul(Ke,g)|0,I=I+Math.imul(_e,K)|0,l=l+Math.imul(_e,ne)|0,l=l+Math.imul(Le,K)|0,F=F+Math.imul(Le,ne)|0;var De=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(De>>>26)|0,De&=67108863,I=Math.imul(At,ut),l=Math.imul(At,_t),l=l+Math.imul(nt,ut)|0,F=Math.imul(nt,_t),I=I+Math.imul(tt,Et)|0,l=l+Math.imul(tt,Mt)|0,l=l+Math.imul(Ft,Et)|0,F=F+Math.imul(Ft,Mt)|0,I=I+Math.imul(re,mt)|0,l=l+Math.imul(re,ht)|0,l=l+Math.imul(Ae,mt)|0,F=F+Math.imul(Ae,ht)|0,I=I+Math.imul(et,Ct)|0,l=l+Math.imul(et,St)|0,l=l+Math.imul(Ve,Ct)|0,F=F+Math.imul(Ve,St)|0,I=I+Math.imul(dt,Ze)|0,l=l+Math.imul(dt,qe)|0,l=l+Math.imul(Qe,Ze)|0,F=F+Math.imul(Qe,qe)|0,I=I+Math.imul(vt,C)|0,l=l+Math.imul(vt,B)|0,l=l+Math.imul(rt,C)|0,F=F+Math.imul(rt,B)|0,I=I+Math.imul(at,R)|0,l=l+Math.imul(at,g)|0,l=l+Math.imul(Je,R)|0,F=F+Math.imul(Je,g)|0,I=I+Math.imul(je,K)|0,l=l+Math.imul(je,ne)|0,l=l+Math.imul(Ke,K)|0,F=F+Math.imul(Ke,ne)|0;var we=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(we>>>26)|0,we&=67108863,I=Math.imul(At,Et),l=Math.imul(At,Mt),l=l+Math.imul(nt,Et)|0,F=Math.imul(nt,Mt),I=I+Math.imul(tt,mt)|0,l=l+Math.imul(tt,ht)|0,l=l+Math.imul(Ft,mt)|0,F=F+Math.imul(Ft,ht)|0,I=I+Math.imul(re,Ct)|0,l=l+Math.imul(re,St)|0,l=l+Math.imul(Ae,Ct)|0,F=F+Math.imul(Ae,St)|0,I=I+Math.imul(et,Ze)|0,l=l+Math.imul(et,qe)|0,l=l+Math.imul(Ve,Ze)|0,F=F+Math.imul(Ve,qe)|0,I=I+Math.imul(dt,C)|0,l=l+Math.imul(dt,B)|0,l=l+Math.imul(Qe,C)|0,F=F+Math.imul(Qe,B)|0,I=I+Math.imul(vt,R)|0,l=l+Math.imul(vt,g)|0,l=l+Math.imul(rt,R)|0,F=F+Math.imul(rt,g)|0,I=I+Math.imul(at,K)|0,l=l+Math.imul(at,ne)|0,l=l+Math.imul(Je,K)|0,F=F+Math.imul(Je,ne)|0;var Be=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Be>>>26)|0,Be&=67108863,I=Math.imul(At,mt),l=Math.imul(At,ht),l=l+Math.imul(nt,mt)|0,F=Math.imul(nt,ht),I=I+Math.imul(tt,Ct)|0,l=l+Math.imul(tt,St)|0,l=l+Math.imul(Ft,Ct)|0,F=F+Math.imul(Ft,St)|0,I=I+Math.imul(re,Ze)|0,l=l+Math.imul(re,qe)|0,l=l+Math.imul(Ae,Ze)|0,F=F+Math.imul(Ae,qe)|0,I=I+Math.imul(et,C)|0,l=l+Math.imul(et,B)|0,l=l+Math.imul(Ve,C)|0,F=F+Math.imul(Ve,B)|0,I=I+Math.imul(dt,R)|0,l=l+Math.imul(dt,g)|0,l=l+Math.imul(Qe,R)|0,F=F+Math.imul(Qe,g)|0,I=I+Math.imul(vt,K)|0,l=l+Math.imul(vt,ne)|0,l=l+Math.imul(rt,K)|0,F=F+Math.imul(rt,ne)|0;var ye=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ye>>>26)|0,ye&=67108863,I=Math.imul(At,Ct),l=Math.imul(At,St),l=l+Math.imul(nt,Ct)|0,F=Math.imul(nt,St),I=I+Math.imul(tt,Ze)|0,l=l+Math.imul(tt,qe)|0,l=l+Math.imul(Ft,Ze)|0,F=F+Math.imul(Ft,qe)|0,I=I+Math.imul(re,C)|0,l=l+Math.imul(re,B)|0,l=l+Math.imul(Ae,C)|0,F=F+Math.imul(Ae,B)|0,I=I+Math.imul(et,R)|0,l=l+Math.imul(et,g)|0,l=l+Math.imul(Ve,R)|0,F=F+Math.imul(Ve,g)|0,I=I+Math.imul(dt,K)|0,l=l+Math.imul(dt,ne)|0,l=l+Math.imul(Qe,K)|0,F=F+Math.imul(Qe,ne)|0;var Ce=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,I=Math.imul(At,Ze),l=Math.imul(At,qe),l=l+Math.imul(nt,Ze)|0,F=Math.imul(nt,qe),I=I+Math.imul(tt,C)|0,l=l+Math.imul(tt,B)|0,l=l+Math.imul(Ft,C)|0,F=F+Math.imul(Ft,B)|0,I=I+Math.imul(re,R)|0,l=l+Math.imul(re,g)|0,l=l+Math.imul(Ae,R)|0,F=F+Math.imul(Ae,g)|0,I=I+Math.imul(et,K)|0,l=l+Math.imul(et,ne)|0,l=l+Math.imul(Ve,K)|0,F=F+Math.imul(Ve,ne)|0;var Re=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,I=Math.imul(At,C),l=Math.imul(At,B),l=l+Math.imul(nt,C)|0,F=Math.imul(nt,B),I=I+Math.imul(tt,R)|0,l=l+Math.imul(tt,g)|0,l=l+Math.imul(Ft,R)|0,F=F+Math.imul(Ft,g)|0,I=I+Math.imul(re,K)|0,l=l+Math.imul(re,ne)|0,l=l+Math.imul(Ae,K)|0,F=F+Math.imul(Ae,ne)|0;var me=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(me>>>26)|0,me&=67108863,I=Math.imul(At,R),l=Math.imul(At,g),l=l+Math.imul(nt,R)|0,F=Math.imul(nt,g),I=I+Math.imul(tt,K)|0,l=l+Math.imul(tt,ne)|0,l=l+Math.imul(Ft,K)|0,F=F+Math.imul(Ft,ne)|0;var ie=(W+I|0)+((l&8191)<<13)|0;W=(F+(l>>>13)|0)+(ie>>>26)|0,ie&=67108863,I=Math.imul(At,K),l=Math.imul(At,ne),l=l+Math.imul(nt,K)|0,F=Math.imul(nt,ne);var se=(W+I|0)+((l&8191)<<13)|0;return W=(F+(l>>>13)|0)+(se>>>26)|0,se&=67108863,U[0]=pe,U[1]=de,U[2]=ge,U[3]=ue,U[4]=Se,U[5]=Ee,U[6]=Fe,U[7]=ke,U[8]=Oe,U[9]=Me,U[10]=De,U[11]=we,U[12]=Be,U[13]=ye,U[14]=Ce,U[15]=Re,U[16]=me,U[17]=ie,U[18]=se,W!==0&&(U[19]=W,w.length++),w};Math.imul||(D=E);function k(S,c,h){h.negative=c.negative^S.negative,h.length=S.length+c.length;for(var w=0,M=0,O=0;O<h.length-1;O++){var U=M;M=0;for(var W=w&67108863,I=Math.min(O,c.length-1),l=Math.max(0,O-S.length+1);l<=I;l++){var F=O-l,ee=S.words[F]|0,J=c.words[l]|0,G=ee*J,he=G&67108863;U=U+(G/67108864|0)|0,he=he+W|0,W=he&67108863,U=U+(he>>>26)|0,M+=U>>>26,U&=67108863}h.words[O]=W,w=U,U=M}return w!==0?h.words[O]=w:h.length--,h.strip()}function H(S,c,h){var w=new P;return w.mulp(S,c,h)}s.prototype.mulTo=function(c,h){var w,M=this.length+c.length;return this.length===10&&c.length===10?w=D(this,c,h):M<63?w=E(this,c,h):M<1024?w=k(this,c,h):w=H(this,c,h),w};function P(S,c){this.x=S,this.y=c}P.prototype.makeRBT=function(c){for(var h=new Array(c),w=s.prototype._countBits(c)-1,M=0;M<c;M++)h[M]=this.revBin(M,w,c);return h},P.prototype.revBin=function(c,h,w){if(c===0||c===w-1)return c;for(var M=0,O=0;O<h;O++)M|=(c&1)<<h-O-1,c>>=1;return M},P.prototype.permute=function(c,h,w,M,O,U){for(var W=0;W<U;W++)M[W]=h[c[W]],O[W]=w[c[W]]},P.prototype.transform=function(c,h,w,M,O,U){this.permute(U,c,h,w,M,O);for(var W=1;W<O;W<<=1)for(var I=W<<1,l=Math.cos(2*Math.PI/I),F=Math.sin(2*Math.PI/I),ee=0;ee<O;ee+=I)for(var J=l,G=F,he=0;he<W;he++){var _e=w[ee+he],Le=M[ee+he],Ie=w[ee+he+W],je=M[ee+he+W],Ke=J*Ie-G*je;je=J*je+G*Ie,Ie=Ke,w[ee+he]=_e+Ie,M[ee+he]=Le+je,w[ee+he+W]=_e-Ie,M[ee+he+W]=Le-je,he!==I&&(Ke=l*J-F*G,G=l*G+F*J,J=Ke)}},P.prototype.guessLen13b=function(c,h){var w=Math.max(h,c)|1,M=w&1,O=0;for(w=w/2|0;w;w=w>>>1)O++;return 1<<O+1+M},P.prototype.conjugate=function(c,h,w){if(!(w<=1))for(var M=0;M<w/2;M++){var O=c[M];c[M]=c[w-M-1],c[w-M-1]=O,O=h[M],h[M]=-h[w-M-1],h[w-M-1]=-O}},P.prototype.normalize13b=function(c,h){for(var w=0,M=0;M<h/2;M++){var O=Math.round(c[2*M+1]/h)*8192+Math.round(c[2*M]/h)+w;c[M]=O&67108863,O<67108864?w=0:w=O/67108864|0}return c},P.prototype.convert13b=function(c,h,w,M){for(var O=0,U=0;U<h;U++)O=O+(c[U]|0),w[2*U]=O&8191,O=O>>>13,w[2*U+1]=O&8191,O=O>>>13;for(U=2*h;U<M;++U)w[U]=0;r(O===0),r((O&-8192)===0)},P.prototype.stub=function(c){for(var h=new Array(c),w=0;w<c;w++)h[w]=0;return h},P.prototype.mulp=function(c,h,w){var M=2*this.guessLen13b(c.length,h.length),O=this.makeRBT(M),U=this.stub(M),W=new Array(M),I=new Array(M),l=new Array(M),F=new Array(M),ee=new Array(M),J=new Array(M),G=w.words;G.length=M,this.convert13b(c.words,c.length,W,M),this.convert13b(h.words,h.length,F,M),this.transform(W,U,I,l,M,O),this.transform(F,U,ee,J,M,O);for(var he=0;he<M;he++){var _e=I[he]*ee[he]-l[he]*J[he];l[he]=I[he]*J[he]+l[he]*ee[he],I[he]=_e}return this.conjugate(I,l,M),this.transform(I,l,G,U,M,O),this.conjugate(G,U,M),this.normalize13b(G,M),w.negative=c.negative^h.negative,w.length=c.length+h.length,w.strip()},s.prototype.mul=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),this.mulTo(c,h)},s.prototype.mulf=function(c){var h=new s(null);return h.words=new Array(this.length+c.length),H(this,c,h)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var h=0,w=0;w<this.length;w++){var M=(this.words[w]|0)*c,O=(M&67108863)+(h&67108863);h>>=26,h+=M/67108864|0,h+=O>>>26,this.words[w]=O&67108863}return h!==0&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(c){return this.clone().imuln(c)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(c){var h=_(c);if(h.length===0)return new s(1);for(var w=this,M=0;M<h.length&&h[M]===0;M++,w=w.sqr());if(++M<h.length)for(var O=w.sqr();M<h.length;M++,O=O.sqr())h[M]!==0&&(w=w.mul(O));return w},s.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=67108863>>>26-h<<26-h,O;if(h!==0){var U=0;for(O=0;O<this.length;O++){var W=this.words[O]&M,I=(this.words[O]|0)-W<<h;this.words[O]=I|U,U=W>>>26-h}U&&(this.words[O]=U,this.length++)}if(w!==0){for(O=this.length-1;O>=0;O--)this.words[O+w]=this.words[O];for(O=0;O<w;O++)this.words[O]=0;this.length+=w}return this.strip()},s.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,h,w){r(typeof c=="number"&&c>=0);var M;h?M=(h-h%26)/26:M=0;var O=c%26,U=Math.min((c-O)/26,this.length),W=67108863^67108863>>>O<<O,I=w;if(M-=U,M=Math.max(0,M),I){for(var l=0;l<U;l++)I.words[l]=this.words[l];I.length=U}if(U!==0)if(this.length>U)for(this.length-=U,l=0;l<this.length;l++)this.words[l]=this.words[l+U];else this.words[0]=0,this.length=1;var F=0;for(l=this.length-1;l>=0&&(F!==0||l>=M);l--){var ee=this.words[l]|0;this.words[l]=F<<26-O|ee>>>O,F=ee&W}return I&&F!==0&&(I.words[I.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(c,h,w){return r(this.negative===0),this.iushrn(c,h,w)},s.prototype.shln=function(c){return this.clone().ishln(c)},s.prototype.ushln=function(c){return this.clone().iushln(c)},s.prototype.shrn=function(c){return this.clone().ishrn(c)},s.prototype.ushrn=function(c){return this.clone().iushrn(c)},s.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return!1;var O=this.words[w];return!!(O&M)},s.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var h=c%26,w=(c-h)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(h!==0&&w++,this.length=Math.min(w,this.length),h!==0){var M=67108863^67108863>>>h<<h;this.words[this.length-1]&=M}return this.strip()},s.prototype.maskn=function(c){return this.clone().imaskn(c)},s.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},s.prototype._iaddn=function(c){this.words[0]+=c;for(var h=0;h<this.length&&this.words[h]>=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h<this.length&&this.words[h]<0;h++)this.words[h]+=67108864,this.words[h+1]-=1;return this.strip()},s.prototype.addn=function(c){return this.clone().iaddn(c)},s.prototype.subn=function(c){return this.clone().isubn(c)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(c,h,w){var M=c.length+w,O;this._expand(M);var U,W=0;for(O=0;O<c.length;O++){U=(this.words[O+w]|0)+W;var I=(c.words[O]|0)*h;U-=I&67108863,W=(U>>26)-(I/67108864|0),this.words[O+w]=U&67108863}for(;O<this.length-w;O++)U=(this.words[O+w]|0)+W,W=U>>26,this.words[O+w]=U&67108863;if(W===0)return this.strip();for(r(W===-1),W=0,O=0;O<this.length;O++)U=-(this.words[O]|0)+W,W=U>>26,this.words[O]=U&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(c,h){var w=this.length-c.length,M=this.clone(),O=c,U=O.words[O.length-1]|0,W=this._countBits(U);w=26-W,w!==0&&(O=O.ushln(w),M.iushln(w),U=O.words[O.length-1]|0);var I=M.length-O.length,l;if(h!=="mod"){l=new s(null),l.length=I+1,l.words=new Array(l.length);for(var F=0;F<l.length;F++)l.words[F]=0}var ee=M.clone()._ishlnsubmul(O,1,I);ee.negative===0&&(M=ee,l&&(l.words[I]=1));for(var J=I-1;J>=0;J--){var G=(M.words[O.length+J]|0)*67108864+(M.words[O.length+J-1]|0);for(G=Math.min(G/U|0,67108863),M._ishlnsubmul(O,G,J);M.negative!==0;)G--,M.negative=0,M._ishlnsubmul(O,1,J),M.isZero()||(M.negative^=1);l&&(l.words[J]=G)}return l&&l.strip(),M.strip(),h!=="div"&&w!==0&&M.iushrn(w),{div:l||null,mod:M}},s.prototype.divmod=function(c,h,w){if(r(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,O,U;return this.negative!==0&&c.negative===0?(U=this.neg().divmod(c,h),h!=="mod"&&(M=U.div.neg()),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.iadd(c)),{div:M,mod:O}):this.negative===0&&c.negative!==0?(U=this.divmod(c.neg(),h),h!=="mod"&&(M=U.div.neg()),{div:M,mod:U.mod}):this.negative&c.negative?(U=this.neg().divmod(c.neg(),h),h!=="div"&&(O=U.mod.neg(),w&&O.negative!==0&&O.isub(c)),{div:U.div,mod:O}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?h==="div"?{div:this.divn(c.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new s(this.modn(c.words[0]))}:this._wordDiv(c,h)},s.prototype.div=function(c){return this.divmod(c,"div",!1).div},s.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},s.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},s.prototype.divRound=function(c){var h=this.divmod(c);if(h.mod.isZero())return h.div;var w=h.div.negative!==0?h.mod.isub(c):h.mod,M=c.ushrn(1),O=c.andln(1),U=w.cmp(M);return U<0||O===1&&U===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(c){r(c<=67108863);for(var h=(1<<26)%c,w=0,M=this.length-1;M>=0;M--)w=(h*w+(this.words[M]|0))%c;return w},s.prototype.idivn=function(c){r(c<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var M=(this.words[w]|0)+h*67108864;this.words[w]=M/c|0,h=M%c}return this.strip()},s.prototype.divn=function(c){return this.clone().idivn(c)},s.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=new s(0),W=new s(1),I=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++I;for(var l=w.clone(),F=h.clone();!h.isZero();){for(var ee=0,J=1;!(h.words[0]&J)&&ee<26;++ee,J<<=1);if(ee>0)for(h.iushrn(ee);ee-- >0;)(M.isOdd()||O.isOdd())&&(M.iadd(l),O.isub(F)),M.iushrn(1),O.iushrn(1);for(var G=0,he=1;!(w.words[0]&he)&&G<26;++G,he<<=1);if(G>0)for(w.iushrn(G);G-- >0;)(U.isOdd()||W.isOdd())&&(U.iadd(l),W.isub(F)),U.iushrn(1),W.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(U),O.isub(W)):(w.isub(h),U.isub(M),W.isub(O))}return{a:U,b:W,gcd:w.iushln(I)}},s.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var h=this,w=c.clone();h.negative!==0?h=h.umod(c):h=h.clone();for(var M=new s(1),O=new s(0),U=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var W=0,I=1;!(h.words[0]&I)&&W<26;++W,I<<=1);if(W>0)for(h.iushrn(W);W-- >0;)M.isOdd()&&M.iadd(U),M.iushrn(1);for(var l=0,F=1;!(w.words[0]&F)&&l<26;++l,F<<=1);if(l>0)for(w.iushrn(l);l-- >0;)O.isOdd()&&O.iadd(U),O.iushrn(1);h.cmp(w)>=0?(h.isub(w),M.isub(O)):(w.isub(h),O.isub(M))}var ee;return h.cmpn(1)===0?ee=M:ee=O,ee.cmpn(0)<0&&ee.iadd(c),ee},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var h=this.clone(),w=c.clone();h.negative=0,w.negative=0;for(var M=0;h.isEven()&&w.isEven();M++)h.iushrn(1),w.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var O=h.cmp(w);if(O<0){var U=h;h=w,w=U}else if(O===0||w.cmpn(1)===0)break;h.isub(w)}while(!0);return w.iushln(M)},s.prototype.invm=function(c){return this.egcd(c).a.umod(c)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(c){return this.words[0]&c},s.prototype.bincn=function(c){r(typeof c=="number");var h=c%26,w=(c-h)/26,M=1<<h;if(this.length<=w)return this._expand(w+1),this.words[w]|=M,this;for(var O=M,U=w;O!==0&&U<this.length;U++){var W=this.words[U]|0;W+=O,O=W>>>26,W&=67108863,this.words[U]=W}return O!==0&&(this.words[U]=O,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var h=c<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this.strip();var w;if(this.length>1)w=1;else{h&&(c=-c),r(c<=67108863,"Number is too big");var M=this.words[0]|0;w=M===c?0:M<c?-1:1}return this.negative!==0?-w|0:w},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var h=this.ucmp(c);return this.negative!==0?-h|0:h},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var h=0,w=this.length-1;w>=0;w--){var M=this.words[w]|0,O=c.words[w]|0;if(M!==O){M<O?h=-1:M>O&&(h=1);break}}return h},s.prototype.gtn=function(c){return this.cmpn(c)===1},s.prototype.gt=function(c){return this.cmp(c)===1},s.prototype.gten=function(c){return this.cmpn(c)>=0},s.prototype.gte=function(c){return this.cmp(c)>=0},s.prototype.ltn=function(c){return this.cmpn(c)===-1},s.prototype.lt=function(c){return this.cmp(c)===-1},s.prototype.lten=function(c){return this.cmpn(c)<=0},s.prototype.lte=function(c){return this.cmp(c)<=0},s.prototype.eqn=function(c){return this.cmpn(c)===0},s.prototype.eq=function(c){return this.cmp(c)===0},s.red=function(c){return new ae(c)},s.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(c){return this.red=c,this},s.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},s.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},s.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},s.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},s.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},s.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},s.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},s.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var T={k256:null,p224:null,p192:null,p25519:null};function z(S,c){this.name=S,this.p=new s(c,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var c=new s(null);return c.words=new Array(Math.ceil(this.n/13)),c},z.prototype.ireduce=function(c){var h=c,w;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),w=h.bitLength();while(w>this.n);var M=w<this.n?-1:h.ucmp(this.p);return M===0?(h.words[0]=0,h.length=1):M>0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},z.prototype.split=function(c,h){c.iushrn(this.n,0,h)},z.prototype.imulK=function(c){return c.imul(this.k)};function V(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(V,z),V.prototype.split=function(c,h){for(var w=4194303,M=Math.min(c.length,9),O=0;O<M;O++)h.words[O]=c.words[O];if(h.length=M,c.length<=9){c.words[0]=0,c.length=1;return}var U=c.words[9];for(h.words[h.length++]=U&w,O=10;O<c.length;O++){var W=c.words[O]|0;c.words[O-10]=(W&w)<<4|U>>>22,U=W}U>>>=22,c.words[O-10]=U,U===0&&c.length>10?c.length-=10:c.length-=9},V.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var h=0,w=0;w<c.length;w++){var M=c.words[w]|0;h+=M*977,c.words[w]=h&67108863,h=M*64+(h/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a(Y,z);function Z(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Z,z);function fe(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(fe,z),fe.prototype.imulK=function(c){for(var h=0,w=0;w<c.length;w++){var M=(c.words[w]|0)*19+h,O=M&67108863;M>>>=26,c.words[w]=O,h=M}return h!==0&&(c.words[c.length++]=h),c},s._prime=function(c){if(T[c])return T[c];var h;if(c==="k256")h=new V;else if(c==="p224")h=new Y;else if(c==="p192")h=new Z;else if(c==="p25519")h=new fe;else throw new Error("Unknown prime "+c);return T[c]=h,h};function ae(S){if(typeof S=="string"){var c=s._prime(S);this.m=c.p,this.prime=c}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}ae.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},ae.prototype._verify2=function(c,h){r((c.negative|h.negative)===0,"red works only with positives"),r(c.red&&c.red===h.red,"red works only with red numbers")},ae.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},ae.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},ae.prototype.add=function(c,h){this._verify2(c,h);var w=c.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},ae.prototype.iadd=function(c,h){this._verify2(c,h);var w=c.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},ae.prototype.sub=function(c,h){this._verify2(c,h);var w=c.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},ae.prototype.isub=function(c,h){this._verify2(c,h);var w=c.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},ae.prototype.shl=function(c,h){return this._verify1(c),this.imod(c.ushln(h))},ae.prototype.imul=function(c,h){return this._verify2(c,h),this.imod(c.imul(h))},ae.prototype.mul=function(c,h){return this._verify2(c,h),this.imod(c.mul(h))},ae.prototype.isqr=function(c){return this.imul(c,c.clone())},ae.prototype.sqr=function(c){return this.mul(c,c)},ae.prototype.sqrt=function(c){if(c.isZero())return c.clone();var h=this.m.andln(3);if(r(h%2===1),h===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(c,w)}for(var M=this.m.subn(1),O=0;!M.isZero()&&M.andln(1)===0;)O++,M.iushrn(1);r(!M.isZero());var U=new s(1).toRed(this),W=U.redNeg(),I=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);this.pow(l,I).cmp(W)!==0;)l.redIAdd(W);for(var F=this.pow(l,M),ee=this.pow(c,M.addn(1).iushrn(1)),J=this.pow(c,M),G=O;J.cmp(U)!==0;){for(var he=J,_e=0;he.cmp(U)!==0;_e++)he=he.redSqr();r(_e<G);var Le=this.pow(F,new s(1).iushln(G-_e-1));ee=ee.redMul(Le),F=Le.redSqr(),J=J.redMul(F),G=_e}return ee},ae.prototype.invm=function(c){var h=c._invmp(this.m);return h.negative!==0?(h.negative=0,this.imod(h).redNeg()):this.imod(h)},ae.prototype.pow=function(c,h){if(h.isZero())return new s(1).toRed(this);if(h.cmpn(1)===0)return c.clone();var w=4,M=new Array(1<<w);M[0]=new s(1).toRed(this),M[1]=c;for(var O=2;O<M.length;O++)M[O]=this.mul(M[O-1],c);var U=M[0],W=0,I=0,l=h.bitLength()%26;for(l===0&&(l=26),O=h.length-1;O>=0;O--){for(var F=h.words[O],ee=l-1;ee>=0;ee--){var J=F>>ee&1;if(U!==M[0]&&(U=this.sqr(U)),J===0&&W===0){I=0;continue}W<<=1,W|=J,I++,!(I!==w&&(O!==0||ee!==0))&&(U=this.mul(U,M[W]),I=0,W=0)}l=26}return U},ae.prototype.convertTo=function(c){var h=c.umod(this.m);return h===c?h.clone():h},ae.prototype.convertFrom=function(c){var h=c.clone();return h.red=null,h},s.mont=function(c){return new X(c)};function X(S){ae.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(X,ae),X.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},X.prototype.convertFrom=function(c){var h=this.imod(c.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(c,h){if(c.isZero()||h.isZero())return c.words[0]=0,c.length=1,c;var w=c.imul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.mul=function(c,h){if(c.isZero()||h.isZero())return new s(0)._forceRed(this);var w=c.mul(h),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),O=w.isub(M).iushrn(this.shift),U=O;return O.cmp(this.m)>=0?U=O.isub(this.m):O.cmpn(0)<0&&(U=O.iadd(this.m)),U._forceRed(this)},X.prototype.invm=function(c){var h=this.imod(c._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(i,Ue)})(Si);var qr=Si.exports,e0=ws;function ws(i,e){if(!i)throw new Error(e||"Assertion failed")}ws.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Fi={};(function(i){var e=i;function t(s,b){if(Array.isArray(s))return s.slice();if(!s)return[];var p=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)p[u]=s[u]|0;return p}if(b==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var u=0;u<s.length;u+=2)p.push(parseInt(s[u]+s[u+1],16))}else for(var u=0;u<s.length;u++){var f=s.charCodeAt(u),o=f>>8,x=f&255;o?p.push(o,x):p.push(x)}return p}e.toArray=t;function r(s){return s.length===1?"0"+s:s}e.zero2=r;function a(s){for(var b="",p=0;p<s.length;p++)b+=r(s[p].toString(16));return b}e.toHex=a,e.encode=function(b,p){return p==="hex"?a(b):b}})(Fi);(function(i){var e=i,t=qr,r=e0,a=Fi;e.assert=r,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function s(o,x,v){var _=new Array(Math.max(o.bitLength(),v)+1),E;for(E=0;E<_.length;E+=1)_[E]=0;var D=1<<x+1,k=o.clone();for(E=0;E<_.length;E++){var H,P=k.andln(D-1);k.isOdd()?(P>(D>>1)-1?H=(D>>1)-P:H=P,k.isubn(H)):H=0,_[E]=H,k.iushrn(1)}return _}e.getNAF=s;function b(o,x){var v=[[],[]];o=o.clone(),x=x.clone();for(var _=0,E=0,D;o.cmpn(-_)>0||x.cmpn(-E)>0;){var k=o.andln(3)+_&3,H=x.andln(3)+E&3;k===3&&(k=-1),H===3&&(H=-1);var P;k&1?(D=o.andln(7)+_&7,(D===3||D===5)&&H===2?P=-k:P=k):P=0,v[0].push(P);var T;H&1?(D=x.andln(7)+E&7,(D===3||D===5)&&k===2?T=-H:T=H):T=0,v[1].push(T),2*_===P+1&&(_=1-_),2*E===T+1&&(E=1-E),o.iushrn(1),x.iushrn(1)}return v}e.getJSF=b;function p(o,x,v){var _="_"+x;o.prototype[x]=function(){return this[_]!==void 0?this[_]:this[_]=v.call(this)}}e.cachedProperty=p;function u(o){return typeof o=="string"?e.toArray(o,"hex"):o}e.parseBytes=u;function f(o){return new t(o,"hex","le")}e.intFromLE=f})(xr);var Mi={exports:{}},ni;Mi.exports=function(e){return ni||(ni=new $r(null)),ni.generate(e)};function $r(i){this.rand=i}Mi.exports.Rand=$r;$r.prototype.generate=function(e){return this._rand(e)};$r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?$r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&($r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Hf=V0;if(typeof Hf.randomBytes!="function")throw new Error("Not supported");$r.prototype._rand=function(e){return Hf.randomBytes(e)}}catch{}var As=Mi.exports,Di={},Kr=qr,M0=xr,j0=M0.getNAF,Oo=M0.getJSF,W0=M0.assert;function Wr(i,e){this.type=i,this.p=new Kr(e.p,16),this.red=e.prime?Kr.red(e.prime):Kr.mont(this.p),this.zero=new Kr(0).toRed(this.red),this.one=new Kr(1).toRed(this.red),this.two=new Kr(2).toRed(this.red),this.n=e.n&&new Kr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var X0=Wr;Wr.prototype.point=function(){throw new Error("Not implemented")};Wr.prototype.validate=function(){throw new Error("Not implemented")};Wr.prototype._fixedNafMul=function(e,t){W0(e.precomputed);var r=e._getDoubles(),a=j0(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2===0?2:1);s/=3;var b=[],p,u;for(p=0;p<a.length;p+=r.step){u=0;for(var f=p+r.step-1;f>=p;f--)u=(u<<1)+a[f];b.push(u)}for(var o=this.jpoint(null,null,null),x=this.jpoint(null,null,null),v=s;v>0;v--){for(p=0;p<b.length;p++)u=b[p],u===v?x=x.mixedAdd(r.points[p]):u===-v&&(x=x.mixedAdd(r.points[p].neg()));o=o.add(x)}return o.toP()};Wr.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,b=j0(t,r,this._bitLength),p=this.jpoint(null,null,null),u=b.length-1;u>=0;u--){for(var f=0;u>=0&&b[u]===0;u--)f++;if(u>=0&&f++,p=p.dblp(f),u<0)break;var o=b[u];W0(o!==0),e.type==="affine"?o>0?p=p.mixedAdd(s[o-1>>1]):p=p.mixedAdd(s[-o-1>>1].neg()):o>0?p=p.add(s[o-1>>1]):p=p.add(s[-o-1>>1].neg())}return e.type==="affine"?p.toP():p};Wr.prototype._wnafMulAdd=function(e,t,r,a,s){var b=this._wnafT1,p=this._wnafT2,u=this._wnafT3,f=0,o,x,v;for(o=0;o<a;o++){v=t[o];var _=v._getNAFPoints(e);b[o]=_.wnd,p[o]=_.points}for(o=a-1;o>=1;o-=2){var E=o-1,D=o;if(b[E]!==1||b[D]!==1){u[E]=j0(r[E],b[E],this._bitLength),u[D]=j0(r[D],b[D],this._bitLength),f=Math.max(u[E].length,f),f=Math.max(u[D].length,f);continue}var k=[t[E],null,null,t[D]];t[E].y.cmp(t[D].y)===0?(k[1]=t[E].add(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg())):t[E].y.cmp(t[D].y.redNeg())===0?(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].add(t[D].neg())):(k[1]=t[E].toJ().mixedAdd(t[D]),k[2]=t[E].toJ().mixedAdd(t[D].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],P=Oo(r[E],r[D]);for(f=Math.max(P[0].length,f),u[E]=new Array(f),u[D]=new Array(f),x=0;x<f;x++){var T=P[0][x]|0,z=P[1][x]|0;u[E][x]=H[(T+1)*3+(z+1)],u[D][x]=0,p[E]=k}}var V=this.jpoint(null,null,null),Y=this._wnafT4;for(o=f;o>=0;o--){for(var Z=0;o>=0;){var fe=!0;for(x=0;x<a;x++)Y[x]=u[x][o]|0,Y[x]!==0&&(fe=!1);if(!fe)break;Z++,o--}if(o>=0&&Z++,V=V.dblp(Z),o<0)break;for(x=0;x<a;x++){var ae=Y[x];ae!==0&&(ae>0?v=p[x][ae-1>>1]:ae<0&&(v=p[x][-ae-1>>1].neg()),v.type==="affine"?V=V.mixedAdd(v):V=V.add(v))}}for(o=0;o<a;o++)p[o]=null;return s?V:V.toP()};function yr(i,e){this.curve=i,this.type=e,this.precomputed=null}Wr.BasePoint=yr;yr.prototype.eq=function(){throw new Error("Not implemented")};yr.prototype.validate=function(){return this.curve.validate(this)};Wr.prototype.decodePoint=function(e,t){e=M0.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){e[0]===6?W0(e[e.length-1]%2===0):e[0]===7&&W0(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return a}else if((e[0]===2||e[0]===3)&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),e[0]===3);throw new Error("Unknown point format")};yr.prototype.encodeCompressed=function(e){return this.encode(e,!0)};yr.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))};yr.prototype.encode=function(e,t){return M0.encode(this._encode(t),e)};yr.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this};yr.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return t?t.points.length>=Math.ceil((e.bitLength()+1)/t.step):!1};yr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,s=0;s<t;s+=e){for(var b=0;b<e;b++)a=a.dbl();r.push(a)}return{step:e,points:r}};yr.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,a=r===1?null:this.dbl(),s=1;s<r;s++)t[s]=t[s-1].add(a);return{wnd:e,points:t}};yr.prototype._getBeta=function(){return null};yr.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var xi={exports:{}};typeof Object.create=="function"?xi.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xi.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Z0=xi.exports,Io=xr,zt=qr,Ri=Z0,u0=X0,No=Io.assert;function mr(i){u0.call(this,"short",i),this.a=new zt(i.a,16).toRed(this.red),this.b=new zt(i.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(i),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Ri(mr,u0);var qo=mr;mr.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,r;if(e.beta)t=new zt(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=a[0].cmp(a[1])<0?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new zt(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))===0?r=s[0]:(r=s[1],No(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0))}var b;return e.basis?b=e.basis.map(function(p){return{a:new zt(p.a,16),b:new zt(p.b,16)}}):b=this._getEndoBasis(r),{beta:t,lambda:r,basis:b}}};mr.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:zt.mont(e),r=new zt(2).toRed(t).redInvm(),a=r.redNeg(),s=new zt(3).toRed(t).redNeg().redSqrt().redMul(r),b=a.redAdd(s).fromRed(),p=a.redSub(s).fromRed();return[b,p]};mr.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=e,a=this.n.clone(),s=new zt(1),b=new zt(0),p=new zt(0),u=new zt(1),f,o,x,v,_,E,D,k=0,H,P;r.cmpn(0)!==0;){var T=a.div(r);H=a.sub(T.mul(r)),P=p.sub(T.mul(s));var z=u.sub(T.mul(b));if(!x&&H.cmp(t)<0)f=D.neg(),o=s,x=H.neg(),v=P;else if(x&&++k===2)break;D=H,a=r,r=H,p=s,s=P,u=b,b=z}_=H.neg(),E=P;var V=x.sqr().add(v.sqr()),Y=_.sqr().add(E.sqr());return Y.cmp(V)>=0&&(_=f,E=o),x.negative&&(x=x.neg(),v=v.neg()),_.negative&&(_=_.neg(),E=E.neg()),[{a:x,b:v},{a:_,b:E}]};mr.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],s=a.b.mul(e).divRound(this.n),b=r.b.neg().mul(e).divRound(this.n),p=s.mul(r.a),u=b.mul(a.a),f=s.mul(r.b),o=b.mul(a.b),x=e.sub(p).sub(u),v=f.add(o).neg();return{k1:x,k2:v}};mr.prototype.pointFromX=function(e,t){e=new zt(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(a.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)};mr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),s=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return r.redSqr().redISub(s).cmpn(0)===0};mr.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,s=this._endoWnafT2,b=0;b<e.length;b++){var p=this._endoSplit(t[b]),u=e[b],f=u._getBeta();p.k1.negative&&(p.k1.ineg(),u=u.neg(!0)),p.k2.negative&&(p.k2.ineg(),f=f.neg(!0)),a[b*2]=u,a[b*2+1]=f,s[b*2]=p.k1,s[b*2+1]=p.k2}for(var o=this._wnafMulAdd(1,a,s,b*2,r),x=0;x<b*2;x++)a[x]=null,s[x]=null;return o};function Jt(i,e,t,r){u0.BasePoint.call(this,i,"affine"),e===null&&t===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new zt(e,16),this.y=new zt(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Ri(Jt,u0.BasePoint);mr.prototype.point=function(e,t,r){return new Jt(this,e,t,r)};mr.prototype.pointFromJSON=function(e,t){return Jt.fromJSON(this,e,t)};Jt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,a=function(s){return r.point(s.x.redMul(r.endo.beta),s.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return t}};Jt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Jt.fromJSON=function(e,t,r){typeof t=="string"&&(t=JSON.parse(t));var a=e.point(t[0],t[1],r);if(!t[2])return a;function s(p){return e.point(p[0],p[1],r)}var b=t[2];return a.precomputed={beta:null,doubles:b.doubles&&{step:b.doubles.step,points:[a].concat(b.doubles.points.map(s))},naf:b.naf&&{wnd:b.naf.wnd,points:[a].concat(b.naf.points.map(s))}},a};Jt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Jt.prototype.isInfinity=function(){return this.inf};Jt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)};Jt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),s=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),b=s.redSqr().redISub(this.x.redAdd(this.x)),p=s.redMul(this.x.redSub(b)).redISub(this.y);return this.curve.point(b,p)};Jt.prototype.getX=function(){return this.x.fromRed()};Jt.prototype.getY=function(){return this.y.fromRed()};Jt.prototype.mul=function(e){return e=new zt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Jt.prototype.mulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s):this.curve._wnafMulAdd(1,a,s,2)};Jt.prototype.jmulAdd=function(e,t,r){var a=[this,t],s=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,s,!0):this.curve._wnafMulAdd(1,a,s,2,!0)};Jt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Jt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,a=function(s){return s.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t};Jt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function rr(i,e,t,r){u0.BasePoint.call(this,i,"jacobian"),e===null&&t===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new zt(0)):(this.x=new zt(e,16),this.y=new zt(t,16),this.z=new zt(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Ri(rr,u0.BasePoint);mr.prototype.jpoint=function(e,t,r){return new rr(this,e,t,r)};rr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)};rr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};rr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(t),s=e.x.redMul(r),b=this.y.redMul(t.redMul(e.z)),p=e.y.redMul(r.redMul(this.z)),u=a.redSub(s),f=b.redSub(p);if(u.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var o=u.redSqr(),x=o.redMul(u),v=a.redMul(o),_=f.redSqr().redIAdd(x).redISub(v).redISub(v),E=f.redMul(v.redISub(_)).redISub(b.redMul(x)),D=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(_,E,D)};rr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,a=e.x.redMul(t),s=this.y,b=e.y.redMul(t).redMul(this.z),p=r.redSub(a),u=s.redSub(b);if(p.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=p.redSqr(),o=f.redMul(p),x=r.redMul(f),v=u.redSqr().redIAdd(o).redISub(x).redISub(x),_=u.redMul(x.redISub(v)).redISub(s.redMul(o)),E=this.z.redMul(p);return this.curve.jpoint(v,_,E)};rr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var a=this.curve.a,s=this.curve.tinv,b=this.x,p=this.y,u=this.z,f=u.redSqr().redSqr(),o=p.redAdd(p);for(t=0;t<e;t++){var x=b.redSqr(),v=o.redSqr(),_=v.redSqr(),E=x.redAdd(x).redIAdd(x).redIAdd(a.redMul(f)),D=b.redMul(v),k=E.redSqr().redISub(D.redAdd(D)),H=D.redISub(k),P=E.redMul(H);P=P.redIAdd(P).redISub(_);var T=o.redMul(u);t+1<e&&(f=f.redMul(_)),b=k,u=T,o=P}return this.curve.jpoint(b,o.redMul(s),u)};rr.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};rr.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a),f=u.redSqr().redISub(p).redISub(p),o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),e=f,t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),v=this.y.redSqr(),_=v.redSqr(),E=this.x.redAdd(v).redSqr().redISub(x).redISub(_);E=E.redIAdd(E);var D=x.redAdd(x).redIAdd(x),k=D.redSqr(),H=_.redIAdd(_);H=H.redIAdd(H),H=H.redIAdd(H),e=k.redISub(E).redISub(E),t=D.redMul(E.redISub(e)).redISub(H),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};rr.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),s=this.y.redSqr(),b=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(a).redISub(b);p=p.redIAdd(p);var u=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),f=u.redSqr().redISub(p).redISub(p);e=f;var o=b.redIAdd(b);o=o.redIAdd(o),o=o.redIAdd(o),t=u.redMul(p.redISub(f)).redISub(o),r=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),v=this.y.redSqr(),_=this.x.redMul(v),E=this.x.redSub(x).redMul(this.x.redAdd(x));E=E.redAdd(E).redIAdd(E);var D=_.redIAdd(_);D=D.redIAdd(D);var k=D.redAdd(D);e=E.redSqr().redISub(k),r=this.y.redAdd(this.z).redSqr().redISub(v).redISub(x);var H=v.redSqr();H=H.redIAdd(H),H=H.redIAdd(H),H=H.redIAdd(H),t=E.redMul(D.redISub(e)).redISub(H)}return this.curve.jpoint(e,t,r)};rr.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,a=this.z,s=a.redSqr().redSqr(),b=t.redSqr(),p=r.redSqr(),u=b.redAdd(b).redIAdd(b).redIAdd(e.redMul(s)),f=t.redAdd(t);f=f.redIAdd(f);var o=f.redMul(p),x=u.redSqr().redISub(o.redAdd(o)),v=o.redISub(x),_=p.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=u.redMul(v).redISub(_),D=r.redAdd(r).redMul(a);return this.curve.jpoint(x,E,D)};rr.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),a=t.redSqr(),s=e.redAdd(e).redIAdd(e),b=s.redSqr(),p=this.x.redAdd(t).redSqr().redISub(e).redISub(a);p=p.redIAdd(p),p=p.redAdd(p).redIAdd(p),p=p.redISub(b);var u=p.redSqr(),f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var o=s.redIAdd(p).redSqr().redISub(b).redISub(u).redISub(f),x=t.redMul(o);x=x.redIAdd(x),x=x.redIAdd(x);var v=this.x.redMul(u).redISub(x);v=v.redIAdd(v),v=v.redIAdd(v);var _=this.y.redMul(o.redMul(f.redISub(o)).redISub(p.redMul(u)));_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var E=this.z.redAdd(p).redSqr().redISub(r).redISub(u);return this.curve.jpoint(v,_,E)};rr.prototype.mul=function(e,t){return e=new zt(e,t),this.curve._wnafMul(this,e)};rr.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var a=t.redMul(this.z),s=r.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(a)).cmpn(0)===0};rr.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return!0;for(var a=e.clone(),s=this.curve.redN.redMul(t);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};rr.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};rr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var i0=qr,Bs=Z0,G0=X0,zo=xr;function h0(i){G0.call(this,"mont",i),this.a=new i0(i.a,16).toRed(this.red),this.b=new i0(i.b,16).toRed(this.red),this.i4=new i0(4).toRed(this.red).redInvm(),this.two=new i0(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Bs(h0,G0);var Lo=h0;h0.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),s=a.redSqrt();return s.redSqr().cmp(a)===0};function Zt(i,e,t){G0.BasePoint.call(this,i,"projective"),e===null&&t===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i0(e,16),this.z=new i0(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Bs(Zt,G0.BasePoint);h0.prototype.decodePoint=function(e,t){return this.point(zo.toArray(e,t),1)};h0.prototype.point=function(e,t){return new Zt(this,e,t)};h0.prototype.pointFromJSON=function(e){return Zt.fromJSON(this,e)};Zt.prototype.precompute=function(){};Zt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Zt.fromJSON=function(e,t){return new Zt(e,t[0],t[1]||e.one)};Zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Zt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Zt.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),s=t.redSub(a),b=t.redMul(a),p=s.redMul(a.redAdd(this.curve.a24.redMul(s)));return this.curve.point(b,p)};Zt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),s=e.x.redAdd(e.z),b=e.x.redSub(e.z),p=b.redMul(r),u=s.redMul(a),f=t.z.redMul(p.redAdd(u).redSqr()),o=t.x.redMul(p.redISub(u).redSqr());return this.curve.point(f,o)};Zt.prototype.mul=function(e){for(var t=e.clone(),r=this,a=this.curve.point(null,null),s=this,b=[];t.cmpn(0)!==0;t.iushrn(1))b.push(t.andln(1));for(var p=b.length-1;p>=0;p--)b[p]===0?(r=r.diffAdd(a,s),a=a.dbl()):(a=r.diffAdd(a,s),r=r.dbl());return a};Zt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Zt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Zt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ho=xr,kr=qr,Cs=Z0,J0=X0,$o=Ho.assert;function Rr(i){this.twisted=(i.a|0)!==1,this.mOneA=this.twisted&&(i.a|0)===-1,this.extended=this.mOneA,J0.call(this,"edwards",i),this.a=new kr(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new kr(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new kr(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),$o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(i.c|0)===1}Cs(Rr,J0);var Uo=Rr;Rr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Rr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Rr.prototype.jpoint=function(e,t,r,a){return this.point(e,t,r,a)};Rr.prototype.pointFromX=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),b=a.redMul(s.redInvm()),p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var u=p.fromRed().isOdd();return(t&&!u||!t&&u)&&(p=p.redNeg()),this.point(e,p)};Rr.prototype.pointFromY=function(e,t){e=new kr(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),b=a.redMul(s.redInvm());if(b.cmp(this.zero)===0){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var p=b.redSqrt();if(p.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");return p.fromRed().isOdd()!==t&&(p=p.redNeg()),this.point(p,e)};Rr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),a=t.redMul(this.a).redAdd(r),s=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return a.cmp(s)===0};function Pt(i,e,t,r,a){J0.BasePoint.call(this,i,"projective"),e===null&&t===null&&r===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new kr(e,16),this.y=new kr(t,16),this.z=r?new kr(r,16):this.curve.one,this.t=a&&new kr(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Cs(Pt,J0.BasePoint);Rr.prototype.pointFromJSON=function(e){return Pt.fromJSON(this,e)};Rr.prototype.point=function(e,t,r,a){return new Pt(this,e,t,r,a)};Pt.fromJSON=function(e,t){return new Pt(e,t[0],t[1],t[2])};Pt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Pt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Pt.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var a=this.curve._mulA(e),s=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),b=a.redAdd(t),p=b.redSub(r),u=a.redSub(t),f=s.redMul(p),o=b.redMul(u),x=s.redMul(u),v=p.redMul(b);return this.curve.point(f,o,v,x)};Pt.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr(),a,s,b,p,u,f;if(this.curve.twisted){p=this.curve._mulA(t);var o=p.redAdd(r);this.zOne?(a=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two)),s=o.redMul(p.redSub(r)),b=o.redSqr().redSub(o).redSub(o)):(u=this.z.redSqr(),f=o.redSub(u).redISub(u),a=e.redSub(t).redISub(r).redMul(f),s=o.redMul(p.redSub(r)),b=o.redMul(f))}else p=t.redAdd(r),u=this.curve._mulC(this.z).redSqr(),f=p.redSub(u).redSub(u),a=this.curve._mulC(e.redISub(p)).redMul(f),s=this.curve._mulC(p).redMul(t.redISub(r)),b=p.redMul(f);return this.curve.point(a,s,b)};Pt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Pt.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),s=this.z.redMul(e.z.redAdd(e.z)),b=r.redSub(t),p=s.redSub(a),u=s.redAdd(a),f=r.redAdd(t),o=b.redMul(p),x=u.redMul(f),v=b.redMul(f),_=p.redMul(u);return this.curve.point(o,x,_,v)};Pt.prototype._projAdd=function(e){var t=this.z.redMul(e.z),r=t.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),b=this.curve.d.redMul(a).redMul(s),p=r.redSub(b),u=r.redAdd(b),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),o=t.redMul(p).redMul(f),x,v;return this.curve.twisted?(x=t.redMul(u).redMul(s.redSub(this.curve._mulA(a))),v=p.redMul(u)):(x=t.redMul(u).redMul(s.redSub(a)),v=this.curve._mulC(p).redMul(u)),this.curve.point(o,x,v)};Pt.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Pt.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Pt.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)};Pt.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)};Pt.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};Pt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Pt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Pt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Pt.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Pt.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var r=e.clone(),a=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),this.x.cmp(t)===0)return!0}};Pt.prototype.toP=Pt.prototype.normalize;Pt.prototype.mixedAdd=Pt.prototype.add;(function(i){var e=i;e.base=X0,e.short=qo,e.mont=Lo,e.edwards=Uo})(Di);var Q0={},en={},ct={},jo=e0,Wo=Z0;ct.inherits=Wo;function Ko(i,e){return(i.charCodeAt(e)&64512)!==55296||e<0||e+1>=i.length?!1:(i.charCodeAt(e+1)&64512)===56320}function Vo(i,e){if(Array.isArray(i))return i.slice();if(!i)return[];var t=[];if(typeof i=="string")if(e){if(e==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),a=0;a<i.length;a+=2)t.push(parseInt(i[a]+i[a+1],16))}else for(var r=0,a=0;a<i.length;a++){var s=i.charCodeAt(a);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=s&63|128):Ko(i,a)?(s=65536+((s&1023)<<10)+(i.charCodeAt(++a)&1023),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=s&63|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=s&63|128)}else for(a=0;a<i.length;a++)t[a]=i[a]|0;return t}ct.toArray=Vo;function Yo(i){for(var e="",t=0;t<i.length;t++)e+=Fs(i[t].toString(16));return e}ct.toHex=Yo;function Ss(i){var e=i>>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return e>>>0}ct.htonl=Ss;function Xo(i,e){for(var t="",r=0;r<i.length;r++){var a=i[r];e==="little"&&(a=Ss(a)),t+=Ms(a.toString(16))}return t}ct.toHex32=Xo;function Fs(i){return i.length===1?"0"+i:i}ct.zero2=Fs;function Ms(i){return i.length===7?"0"+i:i.length===6?"00"+i:i.length===5?"000"+i:i.length===4?"0000"+i:i.length===3?"00000"+i:i.length===2?"000000"+i:i.length===1?"0000000"+i:i}ct.zero8=Ms;function Zo(i,e,t,r){var a=t-e;jo(a%4===0);for(var s=new Array(a/4),b=0,p=e;b<s.length;b++,p+=4){var u;r==="big"?u=i[p]<<24|i[p+1]<<16|i[p+2]<<8|i[p+3]:u=i[p+3]<<24|i[p+2]<<16|i[p+1]<<8|i[p],s[b]=u>>>0}return s}ct.join32=Zo;function Go(i,e){for(var t=new Array(i.length*4),r=0,a=0;r<i.length;r++,a+=4){var s=i[r];e==="big"?(t[a]=s>>>24,t[a+1]=s>>>16&255,t[a+2]=s>>>8&255,t[a+3]=s&255):(t[a+3]=s>>>24,t[a+2]=s>>>16&255,t[a+1]=s>>>8&255,t[a]=s&255)}return t}ct.split32=Go;function Jo(i,e){return i>>>e|i<<32-e}ct.rotr32=Jo;function Qo(i,e){return i<<e|i>>>32-e}ct.rotl32=Qo;function ec(i,e){return i+e>>>0}ct.sum32=ec;function tc(i,e,t){return i+e+t>>>0}ct.sum32_3=tc;function rc(i,e,t,r){return i+e+t+r>>>0}ct.sum32_4=rc;function nc(i,e,t,r,a){return i+e+t+r+a>>>0}ct.sum32_5=nc;function ic(i,e,t,r){var a=i[e],s=i[e+1],b=r+s>>>0,p=(b<r?1:0)+t+a;i[e]=p>>>0,i[e+1]=b}ct.sum64=ic;function fc(i,e,t,r){var a=e+r>>>0,s=(a<e?1:0)+i+t;return s>>>0}ct.sum64_hi=fc;function sc(i,e,t,r){var a=e+r;return a>>>0}ct.sum64_lo=sc;function ac(i,e,t,r,a,s,b,p){var u=0,f=e;f=f+r>>>0,u+=f<e?1:0,f=f+s>>>0,u+=f<s?1:0,f=f+p>>>0,u+=f<p?1:0;var o=i+t+a+b+u;return o>>>0}ct.sum64_4_hi=ac;function oc(i,e,t,r,a,s,b,p){var u=e+r+s+p;return u>>>0}ct.sum64_4_lo=oc;function cc(i,e,t,r,a,s,b,p,u,f){var o=0,x=e;x=x+r>>>0,o+=x<e?1:0,x=x+s>>>0,o+=x<s?1:0,x=x+p>>>0,o+=x<p?1:0,x=x+f>>>0,o+=x<f?1:0;var v=i+t+a+b+u+o;return v>>>0}ct.sum64_5_hi=cc;function dc(i,e,t,r,a,s,b,p,u,f){var o=e+r+s+p+f;return o>>>0}ct.sum64_5_lo=dc;function uc(i,e,t){var r=e<<32-t|i>>>t;return r>>>0}ct.rotr64_hi=uc;function hc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.rotr64_lo=hc;function lc(i,e,t){return i>>>t}ct.shr64_hi=lc;function xc(i,e,t){var r=i<<32-t|e>>>t;return r>>>0}ct.shr64_lo=xc;var l0={},$f=ct,pc=e0;function tn(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}l0.BlockHash=tn;tn.prototype.update=function(e,t){if(e=$f.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=$f.join32(e,0,e.length-r,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};tn.prototype.digest=function(e){return this.update(this._pad()),pc(this.pending===null),this._digest(e)};tn.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,a=new Array(r+this.padLength);a[0]=128;for(var s=1;s<r;s++)a[s]=0;if(e<<=3,this.endian==="big"){for(var b=8;b<this.padLength;b++)a[s++]=0;a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=e>>>24&255,a[s++]=e>>>16&255,a[s++]=e>>>8&255,a[s++]=e&255}else for(a[s++]=e&255,a[s++]=e>>>8&255,a[s++]=e>>>16&255,a[s++]=e>>>24&255,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,b=8;b<this.padLength;b++)a[s++]=0;return a};var x0={},Pr={},bc=ct,Ar=bc.rotr32;function vc(i,e,t,r){if(i===0)return Ds(e,t,r);if(i===1||i===3)return Ps(e,t,r);if(i===2)return Rs(e,t,r)}Pr.ft_1=vc;function Ds(i,e,t){return i&e^~i&t}Pr.ch32=Ds;function Rs(i,e,t){return i&e^i&t^e&t}Pr.maj32=Rs;function Ps(i,e,t){return i^e^t}Pr.p32=Ps;function yc(i){return Ar(i,2)^Ar(i,13)^Ar(i,22)}Pr.s0_256=yc;function mc(i){return Ar(i,6)^Ar(i,11)^Ar(i,25)}Pr.s1_256=mc;function gc(i){return Ar(i,7)^Ar(i,18)^i>>>3}Pr.g0_256=gc;function _c(i){return Ar(i,17)^Ar(i,19)^i>>>10}Pr.g1_256=_c;var s0=ct,Ec=l0,wc=Pr,ii=s0.rotl32,E0=s0.sum32,Ac=s0.sum32_5,Bc=wc.ft_1,Ts=Ec.BlockHash,Cc=[1518500249,1859775393,2400959708,3395469782];function Sr(){if(!(this instanceof Sr))return new Sr;Ts.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}s0.inherits(Sr,Ts);var Sc=Sr;Sr.blockSize=512;Sr.outSize=160;Sr.hmacStrength=80;Sr.padLength=64;Sr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=ii(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4];for(a=0;a<r.length;a++){var o=~~(a/20),x=Ac(ii(s,5),Bc(o,b,p,u),f,r[a],Cc[o]);f=u,u=p,p=ii(b,30),b=s,s=x}this.h[0]=E0(this.h[0],s),this.h[1]=E0(this.h[1],b),this.h[2]=E0(this.h[2],p),this.h[3]=E0(this.h[3],u),this.h[4]=E0(this.h[4],f)};Sr.prototype._digest=function(e){return e==="hex"?s0.toHex32(this.h,"big"):s0.split32(this.h,"big")};var a0=ct,Fc=l0,p0=Pr,Mc=e0,gr=a0.sum32,Dc=a0.sum32_4,Rc=a0.sum32_5,Pc=p0.ch32,Tc=p0.maj32,kc=p0.s0_256,Oc=p0.s1_256,Ic=p0.g0_256,Nc=p0.g1_256,ks=Fc.BlockHash,qc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Fr(){if(!(this instanceof Fr))return new Fr;ks.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=qc,this.W=new Array(64)}a0.inherits(Fr,ks);var Os=Fr;Fr.blockSize=512;Fr.outSize=256;Fr.hmacStrength=192;Fr.padLength=64;Fr.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=Dc(Nc(r[a-2]),r[a-7],Ic(r[a-15]),r[a-16]);var s=this.h[0],b=this.h[1],p=this.h[2],u=this.h[3],f=this.h[4],o=this.h[5],x=this.h[6],v=this.h[7];for(Mc(this.k.length===r.length),a=0;a<r.length;a++){var _=Rc(v,Oc(f),Pc(f,o,x),this.k[a],r[a]),E=gr(kc(s),Tc(s,b,p));v=x,x=o,o=f,f=gr(u,_),u=p,p=b,b=s,s=gr(_,E)}this.h[0]=gr(this.h[0],s),this.h[1]=gr(this.h[1],b),this.h[2]=gr(this.h[2],p),this.h[3]=gr(this.h[3],u),this.h[4]=gr(this.h[4],f),this.h[5]=gr(this.h[5],o),this.h[6]=gr(this.h[6],x),this.h[7]=gr(this.h[7],v)};Fr.prototype._digest=function(e){return e==="hex"?a0.toHex32(this.h,"big"):a0.split32(this.h,"big")};var pi=ct,Is=Os;function Ir(){if(!(this instanceof Ir))return new Ir;Is.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pi.inherits(Ir,Is);var zc=Ir;Ir.blockSize=512;Ir.outSize=224;Ir.hmacStrength=192;Ir.padLength=64;Ir.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h.slice(0,7),"big"):pi.split32(this.h.slice(0,7),"big")};var hr=ct,Lc=l0,Hc=e0,Br=hr.rotr64_hi,Cr=hr.rotr64_lo,Ns=hr.shr64_hi,qs=hr.shr64_lo,Hr=hr.sum64,fi=hr.sum64_hi,si=hr.sum64_lo,$c=hr.sum64_4_hi,Uc=hr.sum64_4_lo,jc=hr.sum64_5_hi,Wc=hr.sum64_5_lo,zs=Lc.BlockHash,Kc=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Er(){if(!(this instanceof Er))return new Er;zs.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Kc,this.W=new Array(160)}hr.inherits(Er,zs);var Ls=Er;Er.blockSize=1024;Er.outSize=512;Er.hmacStrength=192;Er.padLength=128;Er.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;a<32;a++)r[a]=e[t+a];for(;a<r.length;a+=2){var s=nd(r[a-4],r[a-3]),b=id(r[a-4],r[a-3]),p=r[a-14],u=r[a-13],f=td(r[a-30],r[a-29]),o=rd(r[a-30],r[a-29]),x=r[a-32],v=r[a-31];r[a]=$c(s,b,p,u,f,o,x,v),r[a+1]=Uc(s,b,p,u,f,o,x,v)}};Er.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,a=this.h[0],s=this.h[1],b=this.h[2],p=this.h[3],u=this.h[4],f=this.h[5],o=this.h[6],x=this.h[7],v=this.h[8],_=this.h[9],E=this.h[10],D=this.h[11],k=this.h[12],H=this.h[13],P=this.h[14],T=this.h[15];Hc(this.k.length===r.length);for(var z=0;z<r.length;z+=2){var V=P,Y=T,Z=Qc(v,_),fe=ed(v,_),ae=Vc(v,_,E,D,k),X=Yc(v,_,E,D,k,H),S=this.k[z],c=this.k[z+1],h=r[z],w=r[z+1],M=jc(V,Y,Z,fe,ae,X,S,c,h,w),O=Wc(V,Y,Z,fe,ae,X,S,c,h,w);V=Gc(a,s),Y=Jc(a,s),Z=Xc(a,s,b,p,u),fe=Zc(a,s,b,p,u,f);var U=fi(V,Y,Z,fe),W=si(V,Y,Z,fe);P=k,T=H,k=E,H=D,E=v,D=_,v=fi(o,x,M,O),_=si(x,x,M,O),o=u,x=f,u=b,f=p,b=a,p=s,a=fi(M,O,U,W),s=si(M,O,U,W)}Hr(this.h,0,a,s),Hr(this.h,2,b,p),Hr(this.h,4,u,f),Hr(this.h,6,o,x),Hr(this.h,8,v,_),Hr(this.h,10,E,D),Hr(this.h,12,k,H),Hr(this.h,14,P,T)};Er.prototype._digest=function(e){return e==="hex"?hr.toHex32(this.h,"big"):hr.split32(this.h,"big")};function Vc(i,e,t,r,a){var s=i&t^~i&a;return s<0&&(s+=4294967296),s}function Yc(i,e,t,r,a,s){var b=e&r^~e&s;return b<0&&(b+=4294967296),b}function Xc(i,e,t,r,a){var s=i&t^i&a^t&a;return s<0&&(s+=4294967296),s}function Zc(i,e,t,r,a,s){var b=e&r^e&s^r&s;return b<0&&(b+=4294967296),b}function Gc(i,e){var t=Br(i,e,28),r=Br(e,i,2),a=Br(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Jc(i,e){var t=Cr(i,e,28),r=Cr(e,i,2),a=Cr(e,i,7),s=t^r^a;return s<0&&(s+=4294967296),s}function Qc(i,e){var t=Br(i,e,14),r=Br(i,e,18),a=Br(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function ed(i,e){var t=Cr(i,e,14),r=Cr(i,e,18),a=Cr(e,i,9),s=t^r^a;return s<0&&(s+=4294967296),s}function td(i,e){var t=Br(i,e,1),r=Br(i,e,8),a=Ns(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function rd(i,e){var t=Cr(i,e,1),r=Cr(i,e,8),a=qs(i,e,7),s=t^r^a;return s<0&&(s+=4294967296),s}function nd(i,e){var t=Br(i,e,19),r=Br(e,i,29),a=Ns(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}function id(i,e){var t=Cr(i,e,19),r=Cr(e,i,29),a=qs(i,e,6),s=t^r^a;return s<0&&(s+=4294967296),s}var bi=ct,Hs=Ls;function Nr(){if(!(this instanceof Nr))return new Nr;Hs.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}bi.inherits(Nr,Hs);var fd=Nr;Nr.blockSize=1024;Nr.outSize=384;Nr.hmacStrength=192;Nr.padLength=128;Nr.prototype._digest=function(e){return e==="hex"?bi.toHex32(this.h.slice(0,12),"big"):bi.split32(this.h.slice(0,12),"big")};x0.sha1=Sc;x0.sha224=zc;x0.sha256=Os;x0.sha384=fd;x0.sha512=Ls;var $s={},Gr=ct,sd=l0,T0=Gr.rotl32,Uf=Gr.sum32,w0=Gr.sum32_3,jf=Gr.sum32_4,Us=sd.BlockHash;function Mr(){if(!(this instanceof Mr))return new Mr;Us.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Gr.inherits(Mr,Us);$s.ripemd160=Mr;Mr.blockSize=512;Mr.outSize=160;Mr.hmacStrength=192;Mr.padLength=64;Mr.prototype._update=function(e,t){for(var r=this.h[0],a=this.h[1],s=this.h[2],b=this.h[3],p=this.h[4],u=r,f=a,o=s,x=b,v=p,_=0;_<80;_++){var E=Uf(T0(jf(r,Wf(_,a,s,b),e[cd[_]+t],ad(_)),ud[_]),p);r=p,p=b,b=T0(s,10),s=a,a=E,E=Uf(T0(jf(u,Wf(79-_,f,o,x),e[dd[_]+t],od(_)),hd[_]),v),u=v,v=x,x=T0(o,10),o=f,f=E}E=w0(this.h[1],s,x),this.h[1]=w0(this.h[2],b,v),this.h[2]=w0(this.h[3],p,u),this.h[3]=w0(this.h[4],r,f),this.h[4]=w0(this.h[0],a,o),this.h[0]=E};Mr.prototype._digest=function(e){return e==="hex"?Gr.toHex32(this.h,"little"):Gr.split32(this.h,"little")};function Wf(i,e,t,r){return i<=15?e^t^r:i<=31?e&t|~e&r:i<=47?(e|~t)^r:i<=63?e&r|t&~r:e^(t|~r)}function ad(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function od(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var cd=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],dd=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],ud=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],hd=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],ld=ct,xd=e0;function o0(i,e,t){if(!(this instanceof o0))return new o0(i,e,t);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(ld.toArray(e,t))}var pd=o0;o0.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),xd(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)};o0.prototype.update=function(e,t){return this.inner.update(e,t),this};o0.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(i){var e=i;e.utils=ct,e.common=l0,e.sha=x0,e.ripemd=$s,e.hmac=pd,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(en);var ai,Kf;function bd(){return Kf||(Kf=1,ai={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),ai}(function(i){var e=i,t=en,r=Di,a=xr,s=a.assert;function b(f){f.type==="short"?this.curve=new r.short(f):f.type==="edwards"?this.curve=new r.edwards(f):this.curve=new r.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=b;function p(f,o){Object.defineProperty(e,f,{configurable:!0,enumerable:!0,get:function(){var x=new b(o);return Object.defineProperty(e,f,{configurable:!0,enumerable:!0,value:x}),x}})}p("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),p("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),p("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),p("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),p("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),p("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),p("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=bd()}catch{u=void 0}p("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})})(Q0);var vd=en,Yr=Fi,js=e0;function Ur(i){if(!(this instanceof Ur))return new Ur(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Yr.toArray(i.entropy,i.entropyEnc||"hex"),t=Yr.toArray(i.nonce,i.nonceEnc||"hex"),r=Yr.toArray(i.pers,i.persEnc||"hex");js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var yd=Ur;Ur.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};Ur.prototype._hmac=function(){return new vd.hmac(this.hash,this.K)};Ur.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Ur.prototype.reseed=function(e,t,r,a){typeof t!="string"&&(a=r,r=t,t=null),e=Yr.toArray(e,t),r=Yr.toArray(r,a),js(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1};Ur.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(a=r,r=t,t=null),r&&(r=Yr.toArray(r,a||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var b=s.slice(0,e);return this._update(r),this._reseed++,Yr.encode(b,t)};var md=qr,gd=xr,vi=gd.assert;function fr(i,e){this.ec=i,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var _d=fr;fr.fromPublic=function(e,t,r){return t instanceof fr?t:new fr(e,{pub:t,pubEnc:r})};fr.fromPrivate=function(e,t,r){return t instanceof fr?t:new fr(e,{priv:t,privEnc:r})};fr.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};fr.prototype.getPublic=function(e,t){return typeof e=="string"&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub};fr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};fr.prototype._importPrivate=function(e,t){this.priv=new md(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)};fr.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==="mont"?vi(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&vi(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};fr.prototype.derive=function(e){return e.validate()||vi(e.validate(),"public point not validated"),e.mul(this.priv).getX()};fr.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)};fr.prototype.verify=function(e,t){return this.ec.verify(e,t,this)};fr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var K0=qr,Pi=xr,Ed=Pi.assert;function rn(i,e){if(i instanceof rn)return i;this._importDER(i,e)||(Ed(i.r&&i.s,"Signature without r or s"),this.r=new K0(i.r,16),this.s=new K0(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var wd=rn;function Ad(){this.place=0}function oi(i,e){var t=i[e.place++];if(!(t&128))return t;var r=t&15;if(r===0||r>4)return!1;for(var a=0,s=0,b=e.place;s<r;s++,b++)a<<=8,a|=i[b],a>>>=0;return a<=127?!1:(e.place=b,a)}function Vf(i){for(var e=0,t=i.length-1;!i[e]&&!(i[e+1]&128)&&e<t;)e++;return e===0?i:i.slice(e)}rn.prototype._importDER=function(e,t){e=Pi.toArray(e,t);var r=new Ad;if(e[r.place++]!==48)return!1;var a=oi(e,r);if(a===!1||a+r.place!==e.length||e[r.place++]!==2)return!1;var s=oi(e,r);if(s===!1)return!1;var b=e.slice(r.place,s+r.place);if(r.place+=s,e[r.place++]!==2)return!1;var p=oi(e,r);if(p===!1||e.length!==p+r.place)return!1;var u=e.slice(r.place,p+r.place);if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new K0(b),this.s=new K0(u),this.recoveryParam=null,!0};function ci(i,e){if(e<128){i.push(e);return}var t=1+(Math.log(e)/Math.LN2>>>3);for(i.push(t|128);--t;)i.push(e>>>(t<<3)&255);i.push(e)}rn.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),r[0]&128&&(r=[0].concat(r)),t=Vf(t),r=Vf(r);!r[0]&&!(r[1]&128);)r=r.slice(1);var a=[2];ci(a,t.length),a=a.concat(t),a.push(2),ci(a,r.length);var s=a.concat(r),b=[48];return ci(b,s.length),b=b.concat(s),Pi.encode(b,e)};var Xr=qr,Ws=yd,Bd=xr,di=Q0,Cd=As,Ks=Bd.assert,Ti=_d,nn=wd;function vr(i){if(!(this instanceof vr))return new vr(i);typeof i=="string"&&(Ks(Object.prototype.hasOwnProperty.call(di,i),"Unknown curve "+i),i=di[i]),i instanceof di.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var Sd=vr;vr.prototype.keyPair=function(e){return new Ti(this,e)};vr.prototype.keyFromPrivate=function(e,t){return Ti.fromPrivate(this,e,t)};vr.prototype.keyFromPublic=function(e,t){return Ti.fromPublic(this,e,t)};vr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Ws({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Cd(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new Xr(2));;){var s=new Xr(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}};vr.prototype._truncateToN=function(e,t){var r=e.byteLength()*8-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};vr.prototype.sign=function(e,t,r,a){typeof r=="object"&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new Xr(e,16));for(var s=this.n.byteLength(),b=t.getPrivate().toArray("be",s),p=e.toArray("be",s),u=new Ws({hash:this.hash,entropy:b,nonce:p,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new Xr(1)),o=0;;o++){var x=a.k?a.k(o):new Xr(u.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(f)>=0)){var v=this.g.mul(x);if(!v.isInfinity()){var _=v.getX(),E=_.umod(this.n);if(E.cmpn(0)!==0){var D=x.invm(this.n).mul(E.mul(t.getPrivate()).iadd(e));if(D=D.umod(this.n),D.cmpn(0)!==0){var k=(v.getY().isOdd()?1:0)|(_.cmp(E)!==0?2:0);return a.canonical&&D.cmp(this.nh)>0&&(D=this.n.sub(D),k^=1),new nn({r:E,s:D,recoveryParam:k})}}}}}};vr.prototype.verify=function(e,t,r,a){e=this._truncateToN(new Xr(e,16)),r=this.keyFromPublic(r,a),t=new nn(t,"hex");var s=t.r,b=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var p=b.invm(this.n),u=p.mul(e).umod(this.n),f=p.mul(s).umod(this.n),o;return this.curve._maxwellTrick?(o=this.g.jmulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.eqXToP(s)):(o=this.g.mulAdd(u,r.getPublic(),f),o.isInfinity()?!1:o.getX().umod(this.n).cmp(s)===0)};vr.prototype.recoverPubKey=function(i,e,t,r){Ks((3&t)===t,"The recovery param is more than two bits"),e=new nn(e,r);var a=this.n,s=new Xr(i),b=e.r,p=e.s,u=t&1,f=t>>1;if(b.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?b=this.curve.pointFromX(b.add(this.curve.n),u):b=this.curve.pointFromX(b,u);var o=e.r.invm(a),x=a.sub(s).mul(o).umod(a),v=p.mul(o).umod(a);return this.g.mulAdd(x,b,v)};vr.prototype.getKeyRecoveryParam=function(i,e,t,r){if(e=new nn(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var a=0;a<4;a++){var s;try{s=this.recoverPubKey(i,e,a)}catch{continue}if(s.eq(t))return a}throw new Error("Unable to find valid recovery factor")};var D0=xr,Vs=D0.assert,Yf=D0.parseBytes,b0=D0.cachedProperty;function Xt(i,e){this.eddsa=i,this._secret=Yf(e.secret),i.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Yf(e.pub)}Xt.fromPublic=function(e,t){return t instanceof Xt?t:new Xt(e,{pub:t})};Xt.fromSecret=function(e,t){return t instanceof Xt?t:new Xt(e,{secret:t})};Xt.prototype.secret=function(){return this._secret};b0(Xt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});b0(Xt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});b0(Xt,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[r]&=127,a[r]|=64,a});b0(Xt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});b0(Xt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});b0(Xt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Xt.prototype.sign=function(e){return Vs(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Xt.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)};Xt.prototype.getSecret=function(e){return Vs(this._secret,"KeyPair is public only"),D0.encode(this.secret(),e)};Xt.prototype.getPublic=function(e){return D0.encode(this.pubBytes(),e)};var Fd=Xt,Md=qr,fn=xr,Dd=fn.assert,sn=fn.cachedProperty,Rd=fn.parseBytes;function t0(i,e){this.eddsa=i,typeof e!="object"&&(e=Rd(e)),Array.isArray(e)&&(e={R:e.slice(0,i.encodingLength),S:e.slice(i.encodingLength)}),Dd(e.R&&e.S,"Signature without R or S"),i.isPoint(e.R)&&(this._R=e.R),e.S instanceof Md&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}sn(t0,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});sn(t0,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});sn(t0,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});sn(t0,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});t0.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};t0.prototype.toHex=function(){return fn.encode(this.toBytes(),"hex").toUpperCase()};var Pd=t0,Td=en,kd=Q0,c0=xr,Od=c0.assert,Ys=c0.parseBytes,Xs=Fd,Xf=Pd;function lr(i){if(Od(i==="ed25519","only tested with ed25519 so far"),!(this instanceof lr))return new lr(i);i=kd[i].curve,this.curve=i,this.g=i.g,this.g.precompute(i.n.bitLength()+1),this.pointClass=i.point().constructor,this.encodingLength=Math.ceil(i.n.bitLength()/8),this.hash=Td.sha512}var Id=lr;lr.prototype.sign=function(e,t){e=Ys(e);var r=this.keyFromSecret(t),a=this.hashInt(r.messagePrefix(),e),s=this.g.mul(a),b=this.encodePoint(s),p=this.hashInt(b,r.pubBytes(),e).mul(r.priv()),u=a.add(p).umod(this.curve.n);return this.makeSignature({R:s,S:u,Rencoded:b})};lr.prototype.verify=function(e,t,r){e=Ys(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),s=this.hashInt(t.Rencoded(),a.pubBytes(),e),b=this.g.mul(t.S()),p=t.R().add(a.pub().mul(s));return p.eq(b)};lr.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return c0.intFromLE(e.digest()).umod(this.curve.n)};lr.prototype.keyFromPublic=function(e){return Xs.fromPublic(this,e)};lr.prototype.keyFromSecret=function(e){return Xs.fromSecret(this,e)};lr.prototype.makeSignature=function(e){return e instanceof Xf?e:new Xf(this,e)};lr.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t};lr.prototype.decodePoint=function(e){e=c0.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(e[t]&-129),a=(e[t]&128)!==0,s=c0.intFromLE(r);return this.curve.pointFromY(s,a)};lr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};lr.prototype.decodeInt=function(e){return c0.intFromLE(e)};lr.prototype.isPoint=function(e){return e instanceof this.pointClass};(function(i){var e=i;e.version=ko.version,e.utils=xr,e.rand=As,e.curve=Di,e.curves=Q0,e.ec=Sd,e.eddsa=Id})(Es);const Zf=_s||mo;class Nd{constructor(){m0(this,"ec");this.ec=new Es.ec("secp256k1")}xphereSign(e,t){return Zf.Sign.signature(e,t)}xphereVerify(e,t,r){return Zf.Sign.signatureValidity(e,t,r)}generateKeys(){const e=this.ec.genKeyPair(),t=e.getPrivate("hex"),r=e.getPublic("hex");return{privateKey:t,publicKey:r}}sign(e,t){return this.ec.keyFromPrivate(t,"hex").sign(e)}verify(e,t,r){return this.ec.keyFromPublic(r,"hex").verify(e,t)}encrypt(e,t){return F0.AES.encrypt(e,t).toString()}decrypt(e,t){return F0.AES.decrypt(e,t).toString(F0.enc.Utf8)}}const qd=new Nd,Dr=Object.create(null);Dr.open="0";Dr.close="1";Dr.ping="2";Dr.pong="3";Dr.message="4";Dr.upgrade="5";Dr.noop="6";const q0=Object.create(null);Object.keys(Dr).forEach(i=>{q0[Dr[i]]=i});const yi={type:"error",data:"parser error"},Zs=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gs=typeof ArrayBuffer=="function",Js=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,ki=({type:i,data:e},t,r)=>Zs&&e instanceof Blob?t?r(e):Gf(e,r):Gs&&(e instanceof ArrayBuffer||Js(e))?t?r(e):Gf(new Blob([e]),r):r(Dr[i]+(e||"")),Gf=(i,e)=>{const t=new FileReader;return t.onload=function(){const r=t.result.split(",")[1];e("b"+(r||""))},t.readAsDataURL(i)};function Jf(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let ui;function zd(i,e){if(Zs&&i.data instanceof Blob)return i.data.arrayBuffer().then(Jf).then(e);if(Gs&&(i.data instanceof ArrayBuffer||Js(i.data)))return e(Jf(i.data));ki(i,!1,t=>{ui||(ui=new TextEncoder),e(ui.encode(t))})}const Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<Qf.length;i++)S0[Qf.charCodeAt(i)]=i;const Ld=i=>{let e=i.length*.75,t=i.length,r,a=0,s,b,p,u;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);const f=new ArrayBuffer(e),o=new Uint8Array(f);for(r=0;r<t;r+=4)s=S0[i.charCodeAt(r)],b=S0[i.charCodeAt(r+1)],p=S0[i.charCodeAt(r+2)],u=S0[i.charCodeAt(r+3)],o[a++]=s<<2|b>>4,o[a++]=(b&15)<<4|p>>2,o[a++]=(p&3)<<6|u&63;return f},Hd=typeof ArrayBuffer=="function",Oi=(i,e)=>{if(typeof i!="string")return{type:"message",data:Qs(i,e)};const t=i.charAt(0);return t==="b"?{type:"message",data:$d(i.substring(1),e)}:q0[t]?i.length>1?{type:q0[t],data:i.substring(1)}:{type:q0[t]}:yi},$d=(i,e)=>{if(Hd){const t=Ld(i);return Qs(t,e)}else return{base64:!0,data:i}},Qs=(i,e)=>{switch(e){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},ea="",Ud=(i,e)=>{const t=i.length,r=new Array(t);let a=0;i.forEach((s,b)=>{ki(s,!1,p=>{r[b]=p,++a===t&&e(r.join(ea))})})},jd=(i,e)=>{const t=i.split(ea),r=[];for(let a=0;a<t.length;a++){const s=Oi(t[a],e);if(r.push(s),s.type==="error")break}return r};function Wd(){return new TransformStream({transform(i,e){zd(i,t=>{const r=t.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const s=new DataView(a.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{a=new Uint8Array(9);const s=new DataView(a.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(t)})}})}let hi;function k0(i){return i.reduce((e,t)=>e+t.length,0)}function O0(i,e){if(i[0].length===e)return i.shift();const t=new Uint8Array(e);let r=0;for(let a=0;a<e;a++)t[a]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),t}function Kd(i,e){hi||(hi=new TextDecoder);const t=[];let r=0,a=-1,s=!1;return new TransformStream({transform(b,p){for(t.push(b);;){if(r===0){if(k0(t)<1)break;const u=O0(t,1);s=(u[0]&128)===128,a=u[0]&127,a<126?r=3:a===126?r=1:r=2}else if(r===1){if(k0(t)<2)break;const u=O0(t,2);a=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(k0(t)<8)break;const u=O0(t,8),f=new DataView(u.buffer,u.byteOffset,u.length),o=f.getUint32(0);if(o>Math.pow(2,21)-1){p.enqueue(yi);break}a=o*Math.pow(2,32)+f.getUint32(4),r=3}else{if(k0(t)<a)break;const u=O0(t,a);p.enqueue(Oi(s?u:hi.decode(u),e)),r=0}if(a===0||a>i){p.enqueue(yi);break}}}})}const ta=4;function jt(i){if(i)return Vd(i)}function Vd(i){for(var e in jt.prototype)i[e]=jt.prototype[e];return i}jt.prototype.on=jt.prototype.addEventListener=function(i,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(e),this};jt.prototype.once=function(i,e){function t(){this.off(i,t),e.apply(this,arguments)}return t.fn=e,this.on(i,t),this};jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(i,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+i];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,a=0;a<t.length;a++)if(r=t[a],r===e||r.fn===e){t.splice(a,1);break}return t.length===0&&delete this._callbacks["$"+i],this};jt.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+i],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,a=t.length;r<a;++r)t[r].apply(this,e)}return this};jt.prototype.emitReserved=jt.prototype.emit;jt.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};jt.prototype.hasListeners=function(i){return!!this.listeners(i).length};const pr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ra(i,...e){return e.reduce((t,r)=>(i.hasOwnProperty(r)&&(t[r]=i[r]),t),{})}const Yd=pr.setTimeout,Xd=pr.clearTimeout;function an(i,e){e.useNativeTimers?(i.setTimeoutFn=Yd.bind(pr),i.clearTimeoutFn=Xd.bind(pr)):(i.setTimeoutFn=pr.setTimeout.bind(pr),i.clearTimeoutFn=pr.clearTimeout.bind(pr))}const Zd=1.33;function Gd(i){return typeof i=="string"?Jd(i):Math.ceil((i.byteLength||i.size)*Zd)}function Jd(i){let e=0,t=0;for(let r=0,a=i.length;r<a;r++)e=i.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}function Qd(i){let e="";for(let t in i)i.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e}function eu(i){let e={},t=i.split("&");for(let r=0,a=t.length;r<a;r++){let s=t[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}class tu extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class Ii extends jt{constructor(e){super(),this.writable=!1,an(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new tu(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Oi(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Qd(e);return t.length?"?"+t:""}}const na="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),mi=64,ru={};let es=0,I0=0,ts;function rs(i){let e="";do e=na[i%mi]+e,i=Math.floor(i/mi);while(i>0);return e}function ia(){const i=rs(+new Date);return i!==ts?(es=0,ts=i):i+"."+rs(es++)}for(;I0<mi;I0++)ru[na[I0]]=I0;let fa=!1;try{fa=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nu=fa;function sa(i){const e=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nu))return new XMLHttpRequest}catch{}if(!e)try{return new pr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function iu(){}const fu=function(){return new sa({xdomain:!1}).responseType!=null}();class su extends Ii{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||a!==e.port}const t=e&&e.forceBase64;this.supportsBinary=fu&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};jd(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ud(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ia()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new f0(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(a,s)=>{this.onError("xhr post error",a,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}}let f0=class z0 extends jt{constructor(e,t){super(),an(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;const t=ra(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new sa(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let a in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(a)&&r.setRequestHeader(a,this.opts.extraHeaders[a])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var a;r.readyState===3&&((a=this.opts.cookieJar)===null||a===void 0||a.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(a){this.setTimeoutFn(()=>{this.onError(a)},0);return}typeof document<"u"&&(this.index=z0.requestsCount++,z0.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=iu,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete z0.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};f0.requestsCount=0;f0.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ns);else if(typeof addEventListener=="function"){const i="onpagehide"in pr?"pagehide":"unload";addEventListener(i,ns,!1)}}function ns(){for(let i in f0.requests)f0.requests.hasOwnProperty(i)&&f0.requests[i].abort()}const Ni=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),N0=pr.WebSocket||pr.MozWebSocket,is=!0,au="arraybuffer",fs=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ou extends Ii{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=fs?{}:ra(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=is&&!fs?t?new N0(e,t):new N0(e):new N0(e,t,r)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;ki(r,this.supportsBinary,s=>{const b={};try{is&&this.ws.send(s)}catch{}a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=ia()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!N0}}class cu extends Ii{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const t=Kd(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),a=Wd();a.readable.pipeTo(e.writable),this.writer=a.writable.getWriter();const s=()=>{r.read().then(({done:p,value:u})=>{p||(this.onPacket(u),s())}).catch(p=>{})};s();const b={type:"open"};this.query.sid&&(b.data=`{"sid":"${this.query.sid}"}`),this.writer.write(b).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;this.writer.write(r).then(()=>{a&&Ni(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const du={websocket:ou,webtransport:cu,polling:su},uu=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gi(i){if(i.length>2e3)throw"URI too long";const e=i,t=i.indexOf("["),r=i.indexOf("]");t!=-1&&r!=-1&&(i=i.substring(0,t)+i.substring(t,r).replace(/:/g,";")+i.substring(r,i.length));let a=uu.exec(i||""),s={},b=14;for(;b--;)s[hu[b]]=a[b]||"";return t!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=lu(s,s.path),s.queryKey=xu(s,s.query),s}function lu(i,e){const t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function xu(i,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,a,s){a&&(t[a]=s)}),t}let aa=class n0 extends jt{constructor(e,t={}){super(),this.binaryType=au,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=gi(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=gi(t.host).host),an(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=eu(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=ta,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new du[e](r)}open(){let e;if(this.opts.rememberUpgrade&&n0.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),r=!1;n0.priorWebsocketSuccess=!1;const a=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",x=>{if(!r)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;n0.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(o(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=t.name,this.emitReserved("upgradeError",v)}}))};function s(){r||(r=!0,o(),t.close(),t=null)}const b=x=>{const v=new Error("probe error: "+x);v.transport=t.name,s(),this.emitReserved("upgradeError",v)};function p(){b("transport closed")}function u(){b("socket closed")}function f(x){t&&x.name!==t.name&&s()}const o=()=>{t.removeListener("open",a),t.removeListener("error",b),t.removeListener("close",p),this.off("close",u),this.off("upgrading",f)};t.once("open",a),t.once("error",b),t.once("close",p),this.once("close",u),this.once("upgrading",f),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(this.readyState="open",n0.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const a=this.writeBuffer[r].data;if(a&&(t+=Gd(a)),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,a){if(typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:e,data:t,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){n0.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const a=e.length;for(;r<a;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};aa.protocol=ta;function pu(i,e="",t){let r=i;t=t||typeof location<"u"&&location,i==null&&(i=t.protocol+"//"+t.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=t.protocol+i:i=t.host+i),/^(https?|wss?):\/\//.test(i)||(typeof t<"u"?i=t.protocol+"//"+i:i="https://"+i),r=gi(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(t&&t.port===r.port?"":":"+r.port),r}const bu=typeof ArrayBuffer=="function",vu=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,oa=Object.prototype.toString,yu=typeof Blob=="function"||typeof Blob<"u"&&oa.call(Blob)==="[object BlobConstructor]",mu=typeof File=="function"||typeof File<"u"&&oa.call(File)==="[object FileConstructor]";function qi(i){return bu&&(i instanceof ArrayBuffer||vu(i))||yu&&i instanceof Blob||mu&&i instanceof File}function L0(i,e){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let t=0,r=i.length;t<r;t++)if(L0(i[t]))return!0;return!1}if(qi(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return L0(i.toJSON(),!0);for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&L0(i[t]))return!0;return!1}function gu(i){const e=[],t=i.data,r=i;return r.data=_i(t,e),r.attachments=e.length,{packet:r,buffers:e}}function _i(i,e){if(!i)return i;if(qi(i)){const t={_placeholder:!0,num:e.length};return e.push(i),t}else if(Array.isArray(i)){const t=new Array(i.length);for(let r=0;r<i.length;r++)t[r]=_i(i[r],e);return t}else if(typeof i=="object"&&!(i instanceof Date)){const t={};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=_i(i[r],e));return t}return i}function _u(i,e){return i.data=Ei(i.data,e),delete i.attachments,i}function Ei(i,e){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<e.length)return e[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let t=0;t<i.length;t++)i[t]=Ei(i[t],e);else if(typeof i=="object")for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Ei(i[t],e));return i}const Eu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wu=5;var pt;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(pt||(pt={}));class Au{constructor(e){this.replacer=e}encode(e){return(e.type===pt.EVENT||e.type===pt.ACK)&&L0(e)?this.encodeAsBinary({type:e.type===pt.EVENT?pt.BINARY_EVENT:pt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===pt.BINARY_EVENT||e.type===pt.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=gu(e),r=this.encodeAsString(t.packet),a=t.buffers;return a.unshift(r),a}}function ss(i){return Object.prototype.toString.call(i)==="[object Object]"}class zi extends jt{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===pt.BINARY_EVENT;r||t.type===pt.BINARY_ACK?(t.type=r?pt.EVENT:pt.ACK,this.reconstructor=new Bu(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(qi(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pt.BINARY_EVENT||r.type===pt.BINARY_ACK){const s=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const b=e.substring(s,t);if(b!=Number(b)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(b)}if(e.charAt(t+1)==="/"){const s=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(s,t)}else r.nsp="/";const a=e.charAt(t+1);if(a!==""&&Number(a)==a){const s=t+1;for(;++t;){const b=e.charAt(t);if(b==null||Number(b)!=b){--t;break}if(t===e.length)break}r.id=Number(e.substring(s,t+1))}if(e.charAt(++t)){const s=this.tryParse(e.substr(t));if(zi.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case pt.CONNECT:return ss(t);case pt.DISCONNECT:return t===void 0;case pt.CONNECT_ERROR:return typeof t=="string"||ss(t);case pt.EVENT:case pt.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Eu.indexOf(t[0])===-1);case pt.ACK:case pt.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=_u(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Cu=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zi,Encoder:Au,get PacketType(){return pt},protocol:wu},Symbol.toStringTag,{value:"Module"}));function _r(i,e,t){return i.on(e,t),function(){i.off(e,t)}}const Su=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ca extends jt{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[_r(e,"open",this.onopen.bind(this)),_r(e,"packet",this.onpacket.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(Su.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const r={type:pt.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const b=this.ids++,p=t.pop();this._registerAckCallback(b,p),r.id=b}const a=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!a||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const a=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(a===void 0){this.acks[e]=t;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===e&&this.sendBuffer.splice(p,1);t.call(this,new Error("operation has timed out"))},a),b=(...p)=>{this.io.clearTimeoutFn(s),t.apply(this,p)};b.withError=!0,this.acks[e]=b}emitWithAck(e,...t){return new Promise((r,a)=>{const s=(b,p)=>b?a(b):r(p);s.withError=!0,t.push(s),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...s)=>r!==this._queue[0]?void 0:(a!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(a)):(this._queue.shift(),t&&t(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case pt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pt.EVENT:case pt.BINARY_EVENT:this.onevent(e);break;case pt.ACK:case pt.BINARY_ACK:this.onack(e);break;case pt.DISCONNECT:this.ondisconnect();break;case pt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...a){r||(r=!0,t.packet({type:pt.ACK,id:e,data:a}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function v0(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}v0.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*i);i=Math.floor(e*10)&1?i+t:i-t}return Math.min(i,this.max)|0};v0.prototype.reset=function(){this.attempts=0};v0.prototype.setMin=function(i){this.ms=i};v0.prototype.setMax=function(i){this.max=i};v0.prototype.setJitter=function(i){this.jitter=i};class wi extends jt{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,an(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const a=t.parser||Cu;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new aa(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const a=_r(t,"open",function(){r.onopen(),e&&e()}),s=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),e?e(p):this.maybeReconnectOnOpen()},b=_r(t,"error",s);if(this._timeout!==!1){const p=this._timeout,u=this.setTimeoutFn(()=>{a(),s(new Error("timeout")),t.close()},p);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(a),this.subs.push(b),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_r(e,"ping",this.onping.bind(this)),_r(e,"data",this.ondata.bind(this)),_r(e,"error",this.onerror.bind(this)),_r(e,"close",this.onclose.bind(this)),_r(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Ni(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new ca(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const A0={};function H0(i,e){typeof i=="object"&&(e=i,i=void 0),e=e||{};const t=pu(i,e.path||"/socket.io"),r=t.source,a=t.id,s=t.path,b=A0[a]&&s in A0[a].nsps,p=e.forceNew||e["force new connection"]||e.multiplex===!1||b;let u;return p?u=new wi(r,e):(A0[a]||(A0[a]=new wi(r,e)),u=A0[a]),t.query&&!e.query&&(e.query=t.queryKey),u.socket(t.path,e)}Object.assign(H0,{Manager:wi,Socket:ca,io:H0,connect:H0});const Vr=class Vr{constructor(){m0(this,"socket");this.socket=H0("http://159.138.233.132:8080")}static getInstance(){return Vr.instance||(Vr.instance=new Vr),Vr.instance}};m0(Vr,"instance");let Ai=Vr;class Fu{constructor(){m0(this,"socketInstance");this.socketInstance=Ai.getInstance()}joinRoom(e){this.socketInstance.socket.emit("joinRoom",e)}leaveRoom(e){this.socketInstance.socket.emit("leaveRoom",e)}confirmMessage(e,t){return this.socketInstance.socket.emit("confirmMessage",e,t)}onMessageReceived(e,t){e==="accountInfo"?this.socketInstance.socket.on("accountInfo",r=>{t(r)}):e==="requestMessage"?this.socketInstance.socket.on("requestMessage",r=>{t(r)}):e==="addressProvide"&&this.socketInstance.socket.on("addressProvide",r=>{t(r)})}offMessageReceived(e){e==="accountInfo"?this.socketInstance.socket.off("accountInfo"):e==="requestMessage"?this.socketInstance.socket.off("requestMessage"):e==="addressProvide"&&this.socketInstance.socket.off("addressProvide")}}const Or=new Fu;class Mu{isAccountCryptoType(e){return typeof e=="object"&&e!==null&&typeof e.signature=="string"&&typeof e.publicKey=="string"&&typeof e.address=="string"&&typeof e.etc=="string"}getAccountCrypto(){return new Promise((e,t)=>{Or.onMessageReceived("accountInfo",r=>{this.isAccountCryptoType(r)?e(r):t(new Error("Invalid account crypto"))})})}reciveRequest(){return new Promise((e,t)=>{Or.onMessageReceived("requestMessage",r=>{r.message==="Request Message"?e(!0):t(new Error("Request message is different"))})})}sendMessage(e,t){return new Promise((r,a)=>{Or.confirmMessage(e,t).connected?r():a(new Error("Send failed"))})}async qrLogin(e,t){try{if(await this.reciveRequest()){await this.sendMessage(e,t);const{publicKey:a,signature:s,address:b}=await this.getAccountCrypto();if(!qd.xphereVerify(t,a,s))throw new Error("Verification failed");return{address:b}}else throw new Error("Verification failed")}catch(r){return Promise.reject(r)}finally{Or.leaveRoom(e)}}}const Du=new Mu;class Ru{generateQrCode(e){const t=F0.lib.WordArray.random(32).toString(F0.enc.Hex);let r="";return e==="login"?r=`zigap://login?roomId=${t}&type=${e}`:e==="send"?r=`zigap://send?roomId=${t}&type=${e}`:e==="provide"&&(r=`zigap://provide?roomId=${t}&type=${e}`),Or.joinRoom(t),{qrCode:r,roomId:t}}}const da=new Ru,Pu=({sigMessage:i,validTime:e,onReceive:t,...r})=>{const[a,s]=br.useState(!0),{qrCode:b,roomId:p}=da.generateQrCode("login");return br.useEffect(()=>{const u=setTimeout(()=>{Or.leaveRoom(p),s(!1)},e*60*1e3);return()=>clearTimeout(u)},[p,e]),br.useEffect(()=>{(async()=>{try{console.log("roomId",p);const o={isSuccess:!0,address:(await Du.qrLogin(p,i)).address};t(o)}catch{t({isSuccess:!1})}})()},[t,i]),a?$0.jsx(ls,{value:b,...r,imageSettings:{src:"/public/zigap-icon.svg",height:35,width:35,excavate:!0}}):$0.jsx("div",{children:"QR loading error"})};class Tu{isAccountType(e){return typeof e=="object"&&e!==null&&typeof e.address=="string"}getAccount(){return new Promise((e,t)=>{Or.onMessageReceived("addressProvide",r=>{this.isAccountType(r)?e(r):t(new Error("Invalid address"))})})}async qrAddressProvide(e){try{return await this.getAccount()}catch(t){return Promise.reject(t)}finally{Or.leaveRoom(e)}}}const ku=new Tu,Ou=({validTime:i,onReceive:e,...t})=>{const[r,a]=br.useState(!0),{qrCode:s,roomId:b}=da.generateQrCode("provide");return br.useEffect(()=>{const p=setTimeout(()=>{Or.leaveRoom(b),a(!1)},i*60*1e3);return()=>clearTimeout(p)},[b,i]),br.useEffect(()=>{(async()=>{try{const f={isSuccess:!0,address:(await ku.qrAddressProvide(b)).address};e(f)}catch{e({isSuccess:!1})}})()},[e]),r?$0.jsx(ls,{value:s,...t}):$0.jsx("div",{children:"QR loading error"})};exports.AddressProvideQR=Ou;exports.LoginQR=Pu;
|
|
51
|
+
*/return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function a(x){if((x>>24&255)===255){var u=x>>16&255,o=x>>8&255,c=x&255;u===255?(u=0,o===255?(o=0,c===255?c=0:++c):++o):++u,x=0,x+=u<<16,x+=o<<8,x+=c}else x+=1<<24;return x}function i(x){return(x[0]=a(x[0]))===0&&(x[1]=a(x[1])),x}var y=r.Encryptor=r.extend({processBlock:function(x,u){var o=this._cipher,c=o.blockSize,v=this._iv,b=this._counter;v&&(b=this._counter=v.slice(0),this._iv=void 0),i(b);var C=b.slice(0);o.encryptBlock(C,0);for(var w=0;w<c;w++)x[u+w]^=C[w]}});return r.Decryptor=y,r}(),t.mode.CTRGladman})}(ef)),ef.exports}var tf={exports:{}},wi;function za(){return wi||(wi=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(i,y){var x=this._cipher,u=x.blockSize,o=this._iv,c=this._keystream;o&&(c=this._keystream=o.slice(0),this._iv=void 0),x.encryptBlock(c,0);for(var v=0;v<u;v++)i[y+v]^=c[v]}});return r.Decryptor=a,r}(),t.mode.OFB})}(tf)),tf.exports}var rf={exports:{}},Bi;function qa(){return Bi||(Bi=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),r.Decryptor=r.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),r}(),t.mode.ECB})}(rf)),rf.exports}var ff={exports:{}},Ci;function Na(){return Ci||(Ci=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.pad.AnsiX923={pad:function(r,a){var i=r.sigBytes,y=a*4,x=y-i%y,u=i+x-1;r.clamp(),r.words[u>>>2]|=x<<24-u%4*8,r.sigBytes+=x},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},t.pad.Ansix923})}(ff)),ff.exports}var nf={exports:{}},Mi;function La(){return Mi||(Mi=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.pad.Iso10126={pad:function(r,a){var i=a*4,y=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(y-1)).concat(t.lib.WordArray.create([y<<24],1))},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},t.pad.Iso10126})}(nf)),nf.exports}var af={exports:{}},Si;function Ha(){return Si||(Si=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.pad.Iso97971={pad:function(r,a){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,a)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}(af)),af.exports}var sf={exports:{}},Fi;function Ua(){return Fi||(Fi=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.pad.ZeroPadding={pad:function(r,a){var i=a*4;r.clamp(),r.sigBytes+=i-(r.sigBytes%i||i)},unpad:function(r){for(var a=r.words,i=r.sigBytes-1,i=r.sigBytes-1;i>=0;i--)if(a[i>>>2]>>>24-i%4*8&255){r.sigBytes=i+1;break}}},t.pad.ZeroPadding})}(sf)),sf.exports}var of={exports:{}},Di;function $a(){return Di||(Di=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(of)),of.exports}var cf={exports:{}},Ri;function Wa(){return Ri||(Ri=1,function(f,e){(function(t,r,a){f.exports=r($e(),C0())})(ke,function(t){return function(r){var a=t,i=a.lib,y=i.CipherParams,x=a.enc,u=x.Hex,o=a.format;o.Hex={stringify:function(c){return c.ciphertext.toString(u)},parse:function(c){var v=u.parse(c);return y.create({ciphertext:v})}}}(),t.format.Hex})}(cf)),cf.exports}var df={exports:{}},Pi;function ja(){return Pi||(Pi=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.BlockCipher,y=r.algo,x=[],u=[],o=[],c=[],v=[],b=[],C=[],w=[],R=[],P=[];(function(){for(var k=[],T=0;T<256;T++)T<128?k[T]=T<<1:k[T]=T<<1^283;for(var H=0,$=0,T=0;T<256;T++){var Y=$^$<<1^$<<2^$<<3^$<<4;Y=Y>>>8^Y&255^99,x[H]=Y,u[Y]=H;var X=k[H],Q=k[X],U=k[Q],A=k[Y]*257^Y*16843008;o[H]=A<<24|A>>>8,c[H]=A<<16|A>>>16,v[H]=A<<8|A>>>24,b[H]=A;var A=U*16843009^Q*65537^X*257^H*16843008;C[Y]=A<<24|A>>>8,w[Y]=A<<16|A>>>16,R[Y]=A<<8|A>>>24,P[Y]=A,H?(H=X^k[k[k[U^X]]],$^=k[k[$]]):H=$=1}})();var q=[0,1,2,4,8,16,32,64,128,27,54],F=y.AES=i.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var T=this._keyPriorReset=this._key,H=T.words,$=T.sigBytes/4,Y=this._nRounds=$+6,X=(Y+1)*4,Q=this._keySchedule=[],U=0;U<X;U++)U<$?Q[U]=H[U]:(k=Q[U-1],U%$?$>6&&U%$==4&&(k=x[k>>>24]<<24|x[k>>>16&255]<<16|x[k>>>8&255]<<8|x[k&255]):(k=k<<8|k>>>24,k=x[k>>>24]<<24|x[k>>>16&255]<<16|x[k>>>8&255]<<8|x[k&255],k^=q[U/$|0]<<24),Q[U]=Q[U-$]^k);for(var A=this._invKeySchedule=[],n=0;n<X;n++){var U=X-n;if(n%4)var k=Q[U];else var k=Q[U-4];n<4||U<=4?A[n]=k:A[n]=C[x[k>>>24]]^w[x[k>>>16&255]]^R[x[k>>>8&255]]^P[x[k&255]]}}},encryptBlock:function(k,T){this._doCryptBlock(k,T,this._keySchedule,o,c,v,b,x)},decryptBlock:function(k,T){var H=k[T+1];k[T+1]=k[T+3],k[T+3]=H,this._doCryptBlock(k,T,this._invKeySchedule,C,w,R,P,u);var H=k[T+1];k[T+1]=k[T+3],k[T+3]=H},_doCryptBlock:function(k,T,H,$,Y,X,Q,U){for(var A=this._nRounds,n=k[T]^H[0],d=k[T+1]^H[1],g=k[T+2]^H[2],B=k[T+3]^H[3],S=4,z=1;z<A;z++){var N=$[n>>>24]^Y[d>>>16&255]^X[g>>>8&255]^Q[B&255]^H[S++],D=$[d>>>24]^Y[g>>>16&255]^X[B>>>8&255]^Q[n&255]^H[S++],h=$[g>>>24]^Y[B>>>16&255]^X[n>>>8&255]^Q[d&255]^H[S++],E=$[B>>>24]^Y[n>>>16&255]^X[d>>>8&255]^Q[g&255]^H[S++];n=N,d=D,g=h,B=E}var N=(U[n>>>24]<<24|U[d>>>16&255]<<16|U[g>>>8&255]<<8|U[B&255])^H[S++],D=(U[d>>>24]<<24|U[g>>>16&255]<<16|U[B>>>8&255]<<8|U[n&255])^H[S++],h=(U[g>>>24]<<24|U[B>>>16&255]<<16|U[n>>>8&255]<<8|U[d&255])^H[S++],E=(U[B>>>24]<<24|U[n>>>16&255]<<16|U[d>>>8&255]<<8|U[g&255])^H[S++];k[T]=N,k[T+1]=D,k[T+2]=h,k[T+3]=E},keySize:256/32});r.AES=i._createHelper(F)}(),t.AES})}(df)),df.exports}var hf={exports:{}},ki;function Ya(){return ki||(ki=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.WordArray,y=a.BlockCipher,x=r.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],v=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],b=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],C=x.DES=y.extend({_doReset:function(){for(var q=this._key,F=q.words,k=[],T=0;T<56;T++){var H=u[T]-1;k[T]=F[H>>>5]>>>31-H%32&1}for(var $=this._subKeys=[],Y=0;Y<16;Y++){for(var X=$[Y]=[],Q=c[Y],T=0;T<24;T++)X[T/6|0]|=k[(o[T]-1+Q)%28]<<31-T%6,X[4+(T/6|0)]|=k[28+(o[T+24]-1+Q)%28]<<31-T%6;X[0]=X[0]<<1|X[0]>>>31;for(var T=1;T<7;T++)X[T]=X[T]>>>(T-1)*4+3;X[7]=X[7]<<5|X[7]>>>27}for(var U=this._invSubKeys=[],T=0;T<16;T++)U[T]=$[15-T]},encryptBlock:function(q,F){this._doCryptBlock(q,F,this._subKeys)},decryptBlock:function(q,F){this._doCryptBlock(q,F,this._invSubKeys)},_doCryptBlock:function(q,F,k){this._lBlock=q[F],this._rBlock=q[F+1],w.call(this,4,252645135),w.call(this,16,65535),R.call(this,2,858993459),R.call(this,8,16711935),w.call(this,1,1431655765);for(var T=0;T<16;T++){for(var H=k[T],$=this._lBlock,Y=this._rBlock,X=0,Q=0;Q<8;Q++)X|=v[Q][((Y^H[Q])&b[Q])>>>0];this._lBlock=Y,this._rBlock=$^X}var U=this._lBlock;this._lBlock=this._rBlock,this._rBlock=U,w.call(this,1,1431655765),R.call(this,8,16711935),R.call(this,2,858993459),w.call(this,16,65535),w.call(this,4,252645135),q[F]=this._lBlock,q[F+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function w(q,F){var k=(this._lBlock>>>q^this._rBlock)&F;this._rBlock^=k,this._lBlock^=k<<q}function R(q,F){var k=(this._rBlock>>>q^this._lBlock)&F;this._lBlock^=k,this._rBlock^=k<<q}r.DES=y._createHelper(C);var P=x.TripleDES=y.extend({_doReset:function(){var q=this._key,F=q.words;if(F.length!==2&&F.length!==4&&F.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var k=F.slice(0,2),T=F.length<4?F.slice(0,2):F.slice(2,4),H=F.length<6?F.slice(0,2):F.slice(4,6);this._des1=C.createEncryptor(i.create(k)),this._des2=C.createEncryptor(i.create(T)),this._des3=C.createEncryptor(i.create(H))},encryptBlock:function(q,F){this._des1.encryptBlock(q,F),this._des2.decryptBlock(q,F),this._des3.encryptBlock(q,F)},decryptBlock:function(q,F){this._des3.decryptBlock(q,F),this._des2.encryptBlock(q,F),this._des1.decryptBlock(q,F)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=y._createHelper(P)}(),t.TripleDES})}(hf)),hf.exports}var uf={exports:{}},Ii;function Ka(){return Ii||(Ii=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.StreamCipher,y=r.algo,x=y.RC4=i.extend({_doReset:function(){for(var c=this._key,v=c.words,b=c.sigBytes,C=this._S=[],w=0;w<256;w++)C[w]=w;for(var w=0,R=0;w<256;w++){var P=w%b,q=v[P>>>2]>>>24-P%4*8&255;R=(R+C[w]+q)%256;var F=C[w];C[w]=C[R],C[R]=F}this._i=this._j=0},_doProcessBlock:function(c,v){c[v]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var c=this._S,v=this._i,b=this._j,C=0,w=0;w<4;w++){v=(v+1)%256,b=(b+c[v])%256;var R=c[v];c[v]=c[b],c[b]=R,C|=c[(c[v]+c[b])%256]<<24-w*8}return this._i=v,this._j=b,C}r.RC4=i._createHelper(x);var o=y.RC4Drop=x.extend({cfg:x.cfg.extend({drop:192}),_doReset:function(){x._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)u.call(this)}});r.RC4Drop=i._createHelper(o)}(),t.RC4})}(uf)),uf.exports}var lf={exports:{}},Ti;function Va(){return Ti||(Ti=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.StreamCipher,y=r.algo,x=[],u=[],o=[],c=y.Rabbit=i.extend({_doReset:function(){for(var b=this._key.words,C=this.cfg.iv,w=0;w<4;w++)b[w]=(b[w]<<8|b[w]>>>24)&16711935|(b[w]<<24|b[w]>>>8)&4278255360;var R=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],P=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535];this._b=0;for(var w=0;w<4;w++)v.call(this);for(var w=0;w<8;w++)P[w]^=R[w+4&7];if(C){var q=C.words,F=q[0],k=q[1],T=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,H=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,$=T>>>16|H&4294901760,Y=H<<16|T&65535;P[0]^=T,P[1]^=$,P[2]^=H,P[3]^=Y,P[4]^=T,P[5]^=$,P[6]^=H,P[7]^=Y;for(var w=0;w<4;w++)v.call(this)}},_doProcessBlock:function(b,C){var w=this._X;v.call(this),x[0]=w[0]^w[5]>>>16^w[3]<<16,x[1]=w[2]^w[7]>>>16^w[5]<<16,x[2]=w[4]^w[1]>>>16^w[7]<<16,x[3]=w[6]^w[3]>>>16^w[1]<<16;for(var R=0;R<4;R++)x[R]=(x[R]<<8|x[R]>>>24)&16711935|(x[R]<<24|x[R]>>>8)&4278255360,b[C+R]^=x[R]},blockSize:128/32,ivSize:64/32});function v(){for(var b=this._X,C=this._C,w=0;w<8;w++)u[w]=C[w];C[0]=C[0]+1295307597+this._b|0,C[1]=C[1]+3545052371+(C[0]>>>0<u[0]>>>0?1:0)|0,C[2]=C[2]+886263092+(C[1]>>>0<u[1]>>>0?1:0)|0,C[3]=C[3]+1295307597+(C[2]>>>0<u[2]>>>0?1:0)|0,C[4]=C[4]+3545052371+(C[3]>>>0<u[3]>>>0?1:0)|0,C[5]=C[5]+886263092+(C[4]>>>0<u[4]>>>0?1:0)|0,C[6]=C[6]+1295307597+(C[5]>>>0<u[5]>>>0?1:0)|0,C[7]=C[7]+3545052371+(C[6]>>>0<u[6]>>>0?1:0)|0,this._b=C[7]>>>0<u[7]>>>0?1:0;for(var w=0;w<8;w++){var R=b[w]+C[w],P=R&65535,q=R>>>16,F=((P*P>>>17)+P*q>>>15)+q*q,k=((R&4294901760)*R|0)+((R&65535)*R|0);o[w]=F^k}b[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,b[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,b[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,b[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,b[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,b[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,b[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,b[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r.Rabbit=i._createHelper(c)}(),t.Rabbit})}(lf)),lf.exports}var xf={exports:{}},Oi;function Xa(){return Oi||(Oi=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.StreamCipher,y=r.algo,x=[],u=[],o=[],c=y.RabbitLegacy=i.extend({_doReset:function(){var b=this._key.words,C=this.cfg.iv,w=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],R=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535];this._b=0;for(var P=0;P<4;P++)v.call(this);for(var P=0;P<8;P++)R[P]^=w[P+4&7];if(C){var q=C.words,F=q[0],k=q[1],T=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,H=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,$=T>>>16|H&4294901760,Y=H<<16|T&65535;R[0]^=T,R[1]^=$,R[2]^=H,R[3]^=Y,R[4]^=T,R[5]^=$,R[6]^=H,R[7]^=Y;for(var P=0;P<4;P++)v.call(this)}},_doProcessBlock:function(b,C){var w=this._X;v.call(this),x[0]=w[0]^w[5]>>>16^w[3]<<16,x[1]=w[2]^w[7]>>>16^w[5]<<16,x[2]=w[4]^w[1]>>>16^w[7]<<16,x[3]=w[6]^w[3]>>>16^w[1]<<16;for(var R=0;R<4;R++)x[R]=(x[R]<<8|x[R]>>>24)&16711935|(x[R]<<24|x[R]>>>8)&4278255360,b[C+R]^=x[R]},blockSize:128/32,ivSize:64/32});function v(){for(var b=this._X,C=this._C,w=0;w<8;w++)u[w]=C[w];C[0]=C[0]+1295307597+this._b|0,C[1]=C[1]+3545052371+(C[0]>>>0<u[0]>>>0?1:0)|0,C[2]=C[2]+886263092+(C[1]>>>0<u[1]>>>0?1:0)|0,C[3]=C[3]+1295307597+(C[2]>>>0<u[2]>>>0?1:0)|0,C[4]=C[4]+3545052371+(C[3]>>>0<u[3]>>>0?1:0)|0,C[5]=C[5]+886263092+(C[4]>>>0<u[4]>>>0?1:0)|0,C[6]=C[6]+1295307597+(C[5]>>>0<u[5]>>>0?1:0)|0,C[7]=C[7]+3545052371+(C[6]>>>0<u[6]>>>0?1:0)|0,this._b=C[7]>>>0<u[7]>>>0?1:0;for(var w=0;w<8;w++){var R=b[w]+C[w],P=R&65535,q=R>>>16,F=((P*P>>>17)+P*q>>>15)+q*q,k=((R&4294901760)*R|0)+((R&65535)*R|0);o[w]=F^k}b[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,b[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,b[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,b[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,b[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,b[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,b[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,b[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r.RabbitLegacy=i._createHelper(c)}(),t.RabbitLegacy})}(xf)),xf.exports}var vf={exports:{}},zi;function Za(){return zi||(zi=1,function(f,e){(function(t,r,a){f.exports=r($e(),Pt(),kt(),At(),C0())})(ke,function(t){return function(){var r=t,a=r.lib,i=a.BlockCipher,y=r.algo;const x=16,u=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function v(P,q){let F=q>>24&255,k=q>>16&255,T=q>>8&255,H=q&255,$=P.sbox[0][F]+P.sbox[1][k];return $=$^P.sbox[2][T],$=$+P.sbox[3][H],$}function b(P,q,F){let k=q,T=F,H;for(let $=0;$<x;++$)k=k^P.pbox[$],T=v(P,k)^T,H=k,k=T,T=H;return H=k,k=T,T=H,T=T^P.pbox[x],k=k^P.pbox[x+1],{left:k,right:T}}function C(P,q,F){let k=q,T=F,H;for(let $=x+1;$>1;--$)k=k^P.pbox[$],T=v(P,k)^T,H=k,k=T,T=H;return H=k,k=T,T=H,T=T^P.pbox[1],k=k^P.pbox[0],{left:k,right:T}}function w(P,q,F){for(let Y=0;Y<4;Y++){P.sbox[Y]=[];for(let X=0;X<256;X++)P.sbox[Y][X]=o[Y][X]}let k=0;for(let Y=0;Y<x+2;Y++)P.pbox[Y]=u[Y]^q[k],k++,k>=F&&(k=0);let T=0,H=0,$=0;for(let Y=0;Y<x+2;Y+=2)$=b(P,T,H),T=$.left,H=$.right,P.pbox[Y]=T,P.pbox[Y+1]=H;for(let Y=0;Y<4;Y++)for(let X=0;X<256;X+=2)$=b(P,T,H),T=$.left,H=$.right,P.sbox[Y][X]=T,P.sbox[Y][X+1]=H;return!0}var R=y.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var P=this._keyPriorReset=this._key,q=P.words,F=P.sigBytes/4;w(c,q,F)}},encryptBlock:function(P,q){var F=b(c,P[q],P[q+1]);P[q]=F.left,P[q+1]=F.right},decryptBlock:function(P,q){var F=C(c,P[q],P[q+1]);P[q]=F.left,P[q+1]=F.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=i._createHelper(R)}(),t.Blowfish})}(vf)),vf.exports}(function(f,e){(function(t,r,a){f.exports=r($e(),_r(),Ca(),Ma(),Pt(),Sa(),kt(),xn(),qf(),Fa(),vn(),Da(),Ra(),Pa(),Nf(),ka(),At(),C0(),Ia(),Ta(),Oa(),za(),qa(),Na(),La(),Ha(),Ua(),$a(),Wa(),ja(),Ya(),Ka(),Va(),Xa(),Za())})(ke,function(t){return t})})(un);var Ga=un.exports;const Mt=nn(Ga);var bn={};const Qa="elliptic",Ja="6.5.5",es="EC cryptography",ts="lib/elliptic.js",rs=["lib"],fs={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},is={type:"git",url:"git@github.com:indutny/elliptic"},ns=["EC","Elliptic","curve","Cryptography"],as="Fedor Indutny <fedor@indutny.com>",ss="MIT",os={url:"https://github.com/indutny/elliptic/issues"},cs="https://github.com/indutny/elliptic",ds={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},hs={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},us={name:Qa,version:Ja,description:es,main:ts,files:rs,scripts:fs,repository:is,keywords:ns,author:as,license:ss,bugs:os,homepage:cs,devDependencies:ds,dependencies:hs};var j0={},Lf={exports:{}};Lf.exports;(function(f){(function(e,t){function r(A,n){if(!A)throw new Error(n||"Assertion failed")}function a(A,n){A.super_=n;var d=function(){};d.prototype=n.prototype,A.prototype=new d,A.prototype.constructor=A}function i(A,n,d){if(i.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((n==="le"||n==="be")&&(d=n,n=10),this._init(A||0,n||10,d||"be"))}typeof e=="object"?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;var y;try{typeof window<"u"&&typeof window.Buffer<"u"?y=window.Buffer:y=mr.Buffer}catch{}i.isBN=function(n){return n instanceof i?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===i.wordSize&&Array.isArray(n.words)},i.max=function(n,d){return n.cmp(d)>0?n:d},i.min=function(n,d){return n.cmp(d)<0?n:d},i.prototype._init=function(n,d,g){if(typeof n=="number")return this._initNumber(n,d,g);if(typeof n=="object")return this._initArray(n,d,g);d==="hex"&&(d=16),r(d===(d|0)&&d>=2&&d<=36),n=n.toString().replace(/\s+/g,"");var B=0;n[0]==="-"&&(B++,this.negative=1),B<n.length&&(d===16?this._parseHex(n,B,g):(this._parseBase(n,d,B),g==="le"&&this._initArray(this.toArray(),d,g)))},i.prototype._initNumber=function(n,d,g){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[n&67108863],this.length=1):n<4503599627370496?(this.words=[n&67108863,n/67108864&67108863],this.length=2):(r(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),d,g)},i.prototype._initArray=function(n,d,g){if(r(typeof n.length=="number"),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var B=0;B<this.length;B++)this.words[B]=0;var S,z,N=0;if(g==="be")for(B=n.length-1,S=0;B>=0;B-=3)z=n[B]|n[B-1]<<8|n[B-2]<<16,this.words[S]|=z<<N&67108863,this.words[S+1]=z>>>26-N&67108863,N+=24,N>=26&&(N-=26,S++);else if(g==="le")for(B=0,S=0;B<n.length;B+=3)z=n[B]|n[B+1]<<8|n[B+2]<<16,this.words[S]|=z<<N&67108863,this.words[S+1]=z>>>26-N&67108863,N+=24,N>=26&&(N-=26,S++);return this.strip()};function x(A,n){var d=A.charCodeAt(n);return d>=65&&d<=70?d-55:d>=97&&d<=102?d-87:d-48&15}function u(A,n,d){var g=x(A,d);return d-1>=n&&(g|=x(A,d-1)<<4),g}i.prototype._parseHex=function(n,d,g){this.length=Math.ceil((n.length-d)/6),this.words=new Array(this.length);for(var B=0;B<this.length;B++)this.words[B]=0;var S=0,z=0,N;if(g==="be")for(B=n.length-1;B>=d;B-=2)N=u(n,d,B)<<S,this.words[z]|=N&67108863,S>=18?(S-=18,z+=1,this.words[z]|=N>>>26):S+=8;else{var D=n.length-d;for(B=D%2===0?d+1:d;B<n.length;B+=2)N=u(n,d,B)<<S,this.words[z]|=N&67108863,S>=18?(S-=18,z+=1,this.words[z]|=N>>>26):S+=8}this.strip()};function o(A,n,d,g){for(var B=0,S=Math.min(A.length,d),z=n;z<S;z++){var N=A.charCodeAt(z)-48;B*=g,N>=49?B+=N-49+10:N>=17?B+=N-17+10:B+=N}return B}i.prototype._parseBase=function(n,d,g){this.words=[0],this.length=1;for(var B=0,S=1;S<=67108863;S*=d)B++;B--,S=S/d|0;for(var z=n.length-g,N=z%B,D=Math.min(z,z-N)+g,h=0,E=g;E<D;E+=B)h=o(n,E,E+B,d),this.imuln(S),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(N!==0){var K=1;for(h=o(n,E,n.length,d),E=0;E<N;E++)K*=d;this.imuln(K),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},i.prototype.copy=function(n){n.words=new Array(this.length);for(var d=0;d<this.length;d++)n.words[d]=this.words[d];n.length=this.length,n.negative=this.negative,n.red=this.red},i.prototype.clone=function(){var n=new i(null);return this.copy(n),n},i.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(n,d){n=n||10,d=d|0||1;var g;if(n===16||n==="hex"){g="";for(var B=0,S=0,z=0;z<this.length;z++){var N=this.words[z],D=((N<<B|S)&16777215).toString(16);S=N>>>24-B&16777215,S!==0||z!==this.length-1?g=c[6-D.length]+D+g:g=D+g,B+=2,B>=26&&(B-=26,z--)}for(S!==0&&(g=S.toString(16)+g);g.length%d!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(n===(n|0)&&n>=2&&n<=36){var h=v[n],E=b[n];g="";var K=this.clone();for(K.negative=0;!K.isZero();){var j=K.modn(E).toString(n);K=K.idivn(E),K.isZero()?g=j+g:g=c[h-j.length]+j+g}for(this.isZero()&&(g="0"+g);g.length%d!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var n=this.words[0];return this.length===2?n+=this.words[1]*67108864:this.length===3&&this.words[2]===1?n+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(n,d){return r(typeof y<"u"),this.toArrayLike(y,n,d)},i.prototype.toArray=function(n,d){return this.toArrayLike(Array,n,d)},i.prototype.toArrayLike=function(n,d,g){var B=this.byteLength(),S=g||Math.max(1,B);r(B<=S,"byte array longer than desired length"),r(S>0,"Requested array length <= 0"),this.strip();var z=d==="le",N=new n(S),D,h,E=this.clone();if(z){for(h=0;!E.isZero();h++)D=E.andln(255),E.iushrn(8),N[h]=D;for(;h<S;h++)N[h]=0}else{for(h=0;h<S-B;h++)N[h]=0;for(h=0;!E.isZero();h++)D=E.andln(255),E.iushrn(8),N[S-h-1]=D}return N},Math.clz32?i.prototype._countBits=function(n){return 32-Math.clz32(n)}:i.prototype._countBits=function(n){var d=n,g=0;return d>=4096&&(g+=13,d>>>=13),d>=64&&(g+=7,d>>>=7),d>=8&&(g+=4,d>>>=4),d>=2&&(g+=2,d>>>=2),g+d},i.prototype._zeroBits=function(n){if(n===0)return 26;var d=n,g=0;return d&8191||(g+=13,d>>>=13),d&127||(g+=7,d>>>=7),d&15||(g+=4,d>>>=4),d&3||(g+=2,d>>>=2),d&1||g++,g},i.prototype.bitLength=function(){var n=this.words[this.length-1],d=this._countBits(n);return(this.length-1)*26+d};function C(A){for(var n=new Array(A.bitLength()),d=0;d<n.length;d++){var g=d/26|0,B=d%26;n[d]=(A.words[g]&1<<B)>>>B}return n}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,d=0;d<this.length;d++){var g=this._zeroBits(this.words[d]);if(n+=g,g!==26)break}return n},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},i.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var d=0;d<n.length;d++)this.words[d]=this.words[d]|n.words[d];return this.strip()},i.prototype.ior=function(n){return r((this.negative|n.negative)===0),this.iuor(n)},i.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},i.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},i.prototype.iuand=function(n){var d;this.length>n.length?d=n:d=this;for(var g=0;g<d.length;g++)this.words[g]=this.words[g]&n.words[g];return this.length=d.length,this.strip()},i.prototype.iand=function(n){return r((this.negative|n.negative)===0),this.iuand(n)},i.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},i.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},i.prototype.iuxor=function(n){var d,g;this.length>n.length?(d=this,g=n):(d=n,g=this);for(var B=0;B<g.length;B++)this.words[B]=d.words[B]^g.words[B];if(this!==d)for(;B<d.length;B++)this.words[B]=d.words[B];return this.length=d.length,this.strip()},i.prototype.ixor=function(n){return r((this.negative|n.negative)===0),this.iuxor(n)},i.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},i.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},i.prototype.inotn=function(n){r(typeof n=="number"&&n>=0);var d=Math.ceil(n/26)|0,g=n%26;this._expand(d),g>0&&d--;for(var B=0;B<d;B++)this.words[B]=~this.words[B]&67108863;return g>0&&(this.words[B]=~this.words[B]&67108863>>26-g),this.strip()},i.prototype.notn=function(n){return this.clone().inotn(n)},i.prototype.setn=function(n,d){r(typeof n=="number"&&n>=0);var g=n/26|0,B=n%26;return this._expand(g+1),d?this.words[g]=this.words[g]|1<<B:this.words[g]=this.words[g]&~(1<<B),this.strip()},i.prototype.iadd=function(n){var d;if(this.negative!==0&&n.negative===0)return this.negative=0,d=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,d=this.isub(n),n.negative=1,d._normSign();var g,B;this.length>n.length?(g=this,B=n):(g=n,B=this);for(var S=0,z=0;z<B.length;z++)d=(g.words[z]|0)+(B.words[z]|0)+S,this.words[z]=d&67108863,S=d>>>26;for(;S!==0&&z<g.length;z++)d=(g.words[z]|0)+S,this.words[z]=d&67108863,S=d>>>26;if(this.length=g.length,S!==0)this.words[this.length]=S,this.length++;else if(g!==this)for(;z<g.length;z++)this.words[z]=g.words[z];return this},i.prototype.add=function(n){var d;return n.negative!==0&&this.negative===0?(n.negative=0,d=this.sub(n),n.negative^=1,d):n.negative===0&&this.negative!==0?(this.negative=0,d=n.sub(this),this.negative=1,d):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},i.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var d=this.iadd(n);return n.negative=1,d._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var g=this.cmp(n);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var B,S;g>0?(B=this,S=n):(B=n,S=this);for(var z=0,N=0;N<S.length;N++)d=(B.words[N]|0)-(S.words[N]|0)+z,z=d>>26,this.words[N]=d&67108863;for(;z!==0&&N<B.length;N++)d=(B.words[N]|0)+z,z=d>>26,this.words[N]=d&67108863;if(z===0&&N<B.length&&B!==this)for(;N<B.length;N++)this.words[N]=B.words[N];return this.length=Math.max(this.length,N),B!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(n){return this.clone().isub(n)};function w(A,n,d){d.negative=n.negative^A.negative;var g=A.length+n.length|0;d.length=g,g=g-1|0;var B=A.words[0]|0,S=n.words[0]|0,z=B*S,N=z&67108863,D=z/67108864|0;d.words[0]=N;for(var h=1;h<g;h++){for(var E=D>>>26,K=D&67108863,j=Math.min(h,n.length-1),W=Math.max(0,h-A.length+1);W<=j;W++){var re=h-W|0;B=A.words[re]|0,S=n.words[W]|0,z=B*S+K,E+=z/67108864|0,K=z&67108863}d.words[h]=K|0,D=E|0}return D!==0?d.words[h]=D|0:d.length--,d.strip()}var R=function(n,d,g){var B=n.words,S=d.words,z=g.words,N=0,D,h,E,K=B[0]|0,j=K&8191,W=K>>>13,re=B[1]|0,ce=re&8191,we=re>>>13,Ae=B[2]|0,Me=Ae&8191,Se=Ae>>>13,G0=B[3]|0,We=G0&8191,Oe=G0>>>13,_0=B[4]|0,Ge=_0&8191,je=_0>>>13,$0=B[5]|0,Qe=$0&8191,ze=$0>>>13,O0=B[6]|0,qe=O0&8191,Fe=O0>>>13,S0=B[7]|0,Je=S0&8191,f0=S0>>>13,F0=B[8]|0,Ne=F0&8191,u0=F0>>>13,Q0=B[9]|0,l0=Q0&8191,He=Q0>>>13,z0=S[0]|0,a0=z0&8191,r0=z0>>>13,q0=S[1]|0,i0=q0&8191,s0=q0>>>13,W0=S[2]|0,e0=W0&8191,n0=W0>>>13,N0=S[3]|0,o0=N0&8191,x0=N0>>>13,D0=S[4]|0,t0=D0&8191,Ve=D0>>>13,rt=S[5]|0,c0=rt&8191,d0=rt>>>13,yt=S[6]|0,Ie=yt&8191,Re=yt>>>13,l=S[7]|0,_=l&8191,m=l>>>13,s=S[8]|0,M=s&8191,p=s>>>13,I=S[9]|0,L=I&8191,V=I>>>13;g.negative=n.negative^d.negative,g.length=19,D=Math.imul(j,a0),h=Math.imul(j,r0),h=h+Math.imul(W,a0)|0,E=Math.imul(W,r0);var ne=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(ne>>>26)|0,ne&=67108863,D=Math.imul(ce,a0),h=Math.imul(ce,r0),h=h+Math.imul(we,a0)|0,E=Math.imul(we,r0),D=D+Math.imul(j,i0)|0,h=h+Math.imul(j,s0)|0,h=h+Math.imul(W,i0)|0,E=E+Math.imul(W,s0)|0;var fe=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(fe>>>26)|0,fe&=67108863,D=Math.imul(Me,a0),h=Math.imul(Me,r0),h=h+Math.imul(Se,a0)|0,E=Math.imul(Se,r0),D=D+Math.imul(ce,i0)|0,h=h+Math.imul(ce,s0)|0,h=h+Math.imul(we,i0)|0,E=E+Math.imul(we,s0)|0,D=D+Math.imul(j,e0)|0,h=h+Math.imul(j,n0)|0,h=h+Math.imul(W,e0)|0,E=E+Math.imul(W,n0)|0;var he=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(he>>>26)|0,he&=67108863,D=Math.imul(We,a0),h=Math.imul(We,r0),h=h+Math.imul(Oe,a0)|0,E=Math.imul(Oe,r0),D=D+Math.imul(Me,i0)|0,h=h+Math.imul(Me,s0)|0,h=h+Math.imul(Se,i0)|0,E=E+Math.imul(Se,s0)|0,D=D+Math.imul(ce,e0)|0,h=h+Math.imul(ce,n0)|0,h=h+Math.imul(we,e0)|0,E=E+Math.imul(we,n0)|0,D=D+Math.imul(j,o0)|0,h=h+Math.imul(j,x0)|0,h=h+Math.imul(W,o0)|0,E=E+Math.imul(W,x0)|0;var te=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(te>>>26)|0,te&=67108863,D=Math.imul(Ge,a0),h=Math.imul(Ge,r0),h=h+Math.imul(je,a0)|0,E=Math.imul(je,r0),D=D+Math.imul(We,i0)|0,h=h+Math.imul(We,s0)|0,h=h+Math.imul(Oe,i0)|0,E=E+Math.imul(Oe,s0)|0,D=D+Math.imul(Me,e0)|0,h=h+Math.imul(Me,n0)|0,h=h+Math.imul(Se,e0)|0,E=E+Math.imul(Se,n0)|0,D=D+Math.imul(ce,o0)|0,h=h+Math.imul(ce,x0)|0,h=h+Math.imul(we,o0)|0,E=E+Math.imul(we,x0)|0,D=D+Math.imul(j,t0)|0,h=h+Math.imul(j,Ve)|0,h=h+Math.imul(W,t0)|0,E=E+Math.imul(W,Ve)|0;var xe=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(xe>>>26)|0,xe&=67108863,D=Math.imul(Qe,a0),h=Math.imul(Qe,r0),h=h+Math.imul(ze,a0)|0,E=Math.imul(ze,r0),D=D+Math.imul(Ge,i0)|0,h=h+Math.imul(Ge,s0)|0,h=h+Math.imul(je,i0)|0,E=E+Math.imul(je,s0)|0,D=D+Math.imul(We,e0)|0,h=h+Math.imul(We,n0)|0,h=h+Math.imul(Oe,e0)|0,E=E+Math.imul(Oe,n0)|0,D=D+Math.imul(Me,o0)|0,h=h+Math.imul(Me,x0)|0,h=h+Math.imul(Se,o0)|0,E=E+Math.imul(Se,x0)|0,D=D+Math.imul(ce,t0)|0,h=h+Math.imul(ce,Ve)|0,h=h+Math.imul(we,t0)|0,E=E+Math.imul(we,Ve)|0,D=D+Math.imul(j,c0)|0,h=h+Math.imul(j,d0)|0,h=h+Math.imul(W,c0)|0,E=E+Math.imul(W,d0)|0;var ue=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(ue>>>26)|0,ue&=67108863,D=Math.imul(qe,a0),h=Math.imul(qe,r0),h=h+Math.imul(Fe,a0)|0,E=Math.imul(Fe,r0),D=D+Math.imul(Qe,i0)|0,h=h+Math.imul(Qe,s0)|0,h=h+Math.imul(ze,i0)|0,E=E+Math.imul(ze,s0)|0,D=D+Math.imul(Ge,e0)|0,h=h+Math.imul(Ge,n0)|0,h=h+Math.imul(je,e0)|0,E=E+Math.imul(je,n0)|0,D=D+Math.imul(We,o0)|0,h=h+Math.imul(We,x0)|0,h=h+Math.imul(Oe,o0)|0,E=E+Math.imul(Oe,x0)|0,D=D+Math.imul(Me,t0)|0,h=h+Math.imul(Me,Ve)|0,h=h+Math.imul(Se,t0)|0,E=E+Math.imul(Se,Ve)|0,D=D+Math.imul(ce,c0)|0,h=h+Math.imul(ce,d0)|0,h=h+Math.imul(we,c0)|0,E=E+Math.imul(we,d0)|0,D=D+Math.imul(j,Ie)|0,h=h+Math.imul(j,Re)|0,h=h+Math.imul(W,Ie)|0,E=E+Math.imul(W,Re)|0;var ve=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(ve>>>26)|0,ve&=67108863,D=Math.imul(Je,a0),h=Math.imul(Je,r0),h=h+Math.imul(f0,a0)|0,E=Math.imul(f0,r0),D=D+Math.imul(qe,i0)|0,h=h+Math.imul(qe,s0)|0,h=h+Math.imul(Fe,i0)|0,E=E+Math.imul(Fe,s0)|0,D=D+Math.imul(Qe,e0)|0,h=h+Math.imul(Qe,n0)|0,h=h+Math.imul(ze,e0)|0,E=E+Math.imul(ze,n0)|0,D=D+Math.imul(Ge,o0)|0,h=h+Math.imul(Ge,x0)|0,h=h+Math.imul(je,o0)|0,E=E+Math.imul(je,x0)|0,D=D+Math.imul(We,t0)|0,h=h+Math.imul(We,Ve)|0,h=h+Math.imul(Oe,t0)|0,E=E+Math.imul(Oe,Ve)|0,D=D+Math.imul(Me,c0)|0,h=h+Math.imul(Me,d0)|0,h=h+Math.imul(Se,c0)|0,E=E+Math.imul(Se,d0)|0,D=D+Math.imul(ce,Ie)|0,h=h+Math.imul(ce,Re)|0,h=h+Math.imul(we,Ie)|0,E=E+Math.imul(we,Re)|0,D=D+Math.imul(j,_)|0,h=h+Math.imul(j,m)|0,h=h+Math.imul(W,_)|0,E=E+Math.imul(W,m)|0;var ge=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(ge>>>26)|0,ge&=67108863,D=Math.imul(Ne,a0),h=Math.imul(Ne,r0),h=h+Math.imul(u0,a0)|0,E=Math.imul(u0,r0),D=D+Math.imul(Je,i0)|0,h=h+Math.imul(Je,s0)|0,h=h+Math.imul(f0,i0)|0,E=E+Math.imul(f0,s0)|0,D=D+Math.imul(qe,e0)|0,h=h+Math.imul(qe,n0)|0,h=h+Math.imul(Fe,e0)|0,E=E+Math.imul(Fe,n0)|0,D=D+Math.imul(Qe,o0)|0,h=h+Math.imul(Qe,x0)|0,h=h+Math.imul(ze,o0)|0,E=E+Math.imul(ze,x0)|0,D=D+Math.imul(Ge,t0)|0,h=h+Math.imul(Ge,Ve)|0,h=h+Math.imul(je,t0)|0,E=E+Math.imul(je,Ve)|0,D=D+Math.imul(We,c0)|0,h=h+Math.imul(We,d0)|0,h=h+Math.imul(Oe,c0)|0,E=E+Math.imul(Oe,d0)|0,D=D+Math.imul(Me,Ie)|0,h=h+Math.imul(Me,Re)|0,h=h+Math.imul(Se,Ie)|0,E=E+Math.imul(Se,Re)|0,D=D+Math.imul(ce,_)|0,h=h+Math.imul(ce,m)|0,h=h+Math.imul(we,_)|0,E=E+Math.imul(we,m)|0,D=D+Math.imul(j,M)|0,h=h+Math.imul(j,p)|0,h=h+Math.imul(W,M)|0,E=E+Math.imul(W,p)|0;var me=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(me>>>26)|0,me&=67108863,D=Math.imul(l0,a0),h=Math.imul(l0,r0),h=h+Math.imul(He,a0)|0,E=Math.imul(He,r0),D=D+Math.imul(Ne,i0)|0,h=h+Math.imul(Ne,s0)|0,h=h+Math.imul(u0,i0)|0,E=E+Math.imul(u0,s0)|0,D=D+Math.imul(Je,e0)|0,h=h+Math.imul(Je,n0)|0,h=h+Math.imul(f0,e0)|0,E=E+Math.imul(f0,n0)|0,D=D+Math.imul(qe,o0)|0,h=h+Math.imul(qe,x0)|0,h=h+Math.imul(Fe,o0)|0,E=E+Math.imul(Fe,x0)|0,D=D+Math.imul(Qe,t0)|0,h=h+Math.imul(Qe,Ve)|0,h=h+Math.imul(ze,t0)|0,E=E+Math.imul(ze,Ve)|0,D=D+Math.imul(Ge,c0)|0,h=h+Math.imul(Ge,d0)|0,h=h+Math.imul(je,c0)|0,E=E+Math.imul(je,d0)|0,D=D+Math.imul(We,Ie)|0,h=h+Math.imul(We,Re)|0,h=h+Math.imul(Oe,Ie)|0,E=E+Math.imul(Oe,Re)|0,D=D+Math.imul(Me,_)|0,h=h+Math.imul(Me,m)|0,h=h+Math.imul(Se,_)|0,E=E+Math.imul(Se,m)|0,D=D+Math.imul(ce,M)|0,h=h+Math.imul(ce,p)|0,h=h+Math.imul(we,M)|0,E=E+Math.imul(we,p)|0,D=D+Math.imul(j,L)|0,h=h+Math.imul(j,V)|0,h=h+Math.imul(W,L)|0,E=E+Math.imul(W,V)|0;var _e=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(_e>>>26)|0,_e&=67108863,D=Math.imul(l0,i0),h=Math.imul(l0,s0),h=h+Math.imul(He,i0)|0,E=Math.imul(He,s0),D=D+Math.imul(Ne,e0)|0,h=h+Math.imul(Ne,n0)|0,h=h+Math.imul(u0,e0)|0,E=E+Math.imul(u0,n0)|0,D=D+Math.imul(Je,o0)|0,h=h+Math.imul(Je,x0)|0,h=h+Math.imul(f0,o0)|0,E=E+Math.imul(f0,x0)|0,D=D+Math.imul(qe,t0)|0,h=h+Math.imul(qe,Ve)|0,h=h+Math.imul(Fe,t0)|0,E=E+Math.imul(Fe,Ve)|0,D=D+Math.imul(Qe,c0)|0,h=h+Math.imul(Qe,d0)|0,h=h+Math.imul(ze,c0)|0,E=E+Math.imul(ze,d0)|0,D=D+Math.imul(Ge,Ie)|0,h=h+Math.imul(Ge,Re)|0,h=h+Math.imul(je,Ie)|0,E=E+Math.imul(je,Re)|0,D=D+Math.imul(We,_)|0,h=h+Math.imul(We,m)|0,h=h+Math.imul(Oe,_)|0,E=E+Math.imul(Oe,m)|0,D=D+Math.imul(Me,M)|0,h=h+Math.imul(Me,p)|0,h=h+Math.imul(Se,M)|0,E=E+Math.imul(Se,p)|0,D=D+Math.imul(ce,L)|0,h=h+Math.imul(ce,V)|0,h=h+Math.imul(we,L)|0,E=E+Math.imul(we,V)|0;var pe=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(pe>>>26)|0,pe&=67108863,D=Math.imul(l0,e0),h=Math.imul(l0,n0),h=h+Math.imul(He,e0)|0,E=Math.imul(He,n0),D=D+Math.imul(Ne,o0)|0,h=h+Math.imul(Ne,x0)|0,h=h+Math.imul(u0,o0)|0,E=E+Math.imul(u0,x0)|0,D=D+Math.imul(Je,t0)|0,h=h+Math.imul(Je,Ve)|0,h=h+Math.imul(f0,t0)|0,E=E+Math.imul(f0,Ve)|0,D=D+Math.imul(qe,c0)|0,h=h+Math.imul(qe,d0)|0,h=h+Math.imul(Fe,c0)|0,E=E+Math.imul(Fe,d0)|0,D=D+Math.imul(Qe,Ie)|0,h=h+Math.imul(Qe,Re)|0,h=h+Math.imul(ze,Ie)|0,E=E+Math.imul(ze,Re)|0,D=D+Math.imul(Ge,_)|0,h=h+Math.imul(Ge,m)|0,h=h+Math.imul(je,_)|0,E=E+Math.imul(je,m)|0,D=D+Math.imul(We,M)|0,h=h+Math.imul(We,p)|0,h=h+Math.imul(Oe,M)|0,E=E+Math.imul(Oe,p)|0,D=D+Math.imul(Me,L)|0,h=h+Math.imul(Me,V)|0,h=h+Math.imul(Se,L)|0,E=E+Math.imul(Se,V)|0;var de=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(de>>>26)|0,de&=67108863,D=Math.imul(l0,o0),h=Math.imul(l0,x0),h=h+Math.imul(He,o0)|0,E=Math.imul(He,x0),D=D+Math.imul(Ne,t0)|0,h=h+Math.imul(Ne,Ve)|0,h=h+Math.imul(u0,t0)|0,E=E+Math.imul(u0,Ve)|0,D=D+Math.imul(Je,c0)|0,h=h+Math.imul(Je,d0)|0,h=h+Math.imul(f0,c0)|0,E=E+Math.imul(f0,d0)|0,D=D+Math.imul(qe,Ie)|0,h=h+Math.imul(qe,Re)|0,h=h+Math.imul(Fe,Ie)|0,E=E+Math.imul(Fe,Re)|0,D=D+Math.imul(Qe,_)|0,h=h+Math.imul(Qe,m)|0,h=h+Math.imul(ze,_)|0,E=E+Math.imul(ze,m)|0,D=D+Math.imul(Ge,M)|0,h=h+Math.imul(Ge,p)|0,h=h+Math.imul(je,M)|0,E=E+Math.imul(je,p)|0,D=D+Math.imul(We,L)|0,h=h+Math.imul(We,V)|0,h=h+Math.imul(Oe,L)|0,E=E+Math.imul(Oe,V)|0;var ye=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(ye>>>26)|0,ye&=67108863,D=Math.imul(l0,t0),h=Math.imul(l0,Ve),h=h+Math.imul(He,t0)|0,E=Math.imul(He,Ve),D=D+Math.imul(Ne,c0)|0,h=h+Math.imul(Ne,d0)|0,h=h+Math.imul(u0,c0)|0,E=E+Math.imul(u0,d0)|0,D=D+Math.imul(Je,Ie)|0,h=h+Math.imul(Je,Re)|0,h=h+Math.imul(f0,Ie)|0,E=E+Math.imul(f0,Re)|0,D=D+Math.imul(qe,_)|0,h=h+Math.imul(qe,m)|0,h=h+Math.imul(Fe,_)|0,E=E+Math.imul(Fe,m)|0,D=D+Math.imul(Qe,M)|0,h=h+Math.imul(Qe,p)|0,h=h+Math.imul(ze,M)|0,E=E+Math.imul(ze,p)|0,D=D+Math.imul(Ge,L)|0,h=h+Math.imul(Ge,V)|0,h=h+Math.imul(je,L)|0,E=E+Math.imul(je,V)|0;var oe=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(oe>>>26)|0,oe&=67108863,D=Math.imul(l0,c0),h=Math.imul(l0,d0),h=h+Math.imul(He,c0)|0,E=Math.imul(He,d0),D=D+Math.imul(Ne,Ie)|0,h=h+Math.imul(Ne,Re)|0,h=h+Math.imul(u0,Ie)|0,E=E+Math.imul(u0,Re)|0,D=D+Math.imul(Je,_)|0,h=h+Math.imul(Je,m)|0,h=h+Math.imul(f0,_)|0,E=E+Math.imul(f0,m)|0,D=D+Math.imul(qe,M)|0,h=h+Math.imul(qe,p)|0,h=h+Math.imul(Fe,M)|0,E=E+Math.imul(Fe,p)|0,D=D+Math.imul(Qe,L)|0,h=h+Math.imul(Qe,V)|0,h=h+Math.imul(ze,L)|0,E=E+Math.imul(ze,V)|0;var le=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(le>>>26)|0,le&=67108863,D=Math.imul(l0,Ie),h=Math.imul(l0,Re),h=h+Math.imul(He,Ie)|0,E=Math.imul(He,Re),D=D+Math.imul(Ne,_)|0,h=h+Math.imul(Ne,m)|0,h=h+Math.imul(u0,_)|0,E=E+Math.imul(u0,m)|0,D=D+Math.imul(Je,M)|0,h=h+Math.imul(Je,p)|0,h=h+Math.imul(f0,M)|0,E=E+Math.imul(f0,p)|0,D=D+Math.imul(qe,L)|0,h=h+Math.imul(qe,V)|0,h=h+Math.imul(Fe,L)|0,E=E+Math.imul(Fe,V)|0;var be=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(be>>>26)|0,be&=67108863,D=Math.imul(l0,_),h=Math.imul(l0,m),h=h+Math.imul(He,_)|0,E=Math.imul(He,m),D=D+Math.imul(Ne,M)|0,h=h+Math.imul(Ne,p)|0,h=h+Math.imul(u0,M)|0,E=E+Math.imul(u0,p)|0,D=D+Math.imul(Je,L)|0,h=h+Math.imul(Je,V)|0,h=h+Math.imul(f0,L)|0,E=E+Math.imul(f0,V)|0;var se=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(se>>>26)|0,se&=67108863,D=Math.imul(l0,M),h=Math.imul(l0,p),h=h+Math.imul(He,M)|0,E=Math.imul(He,p),D=D+Math.imul(Ne,L)|0,h=h+Math.imul(Ne,V)|0,h=h+Math.imul(u0,L)|0,E=E+Math.imul(u0,V)|0;var Z=(N+D|0)+((h&8191)<<13)|0;N=(E+(h>>>13)|0)+(Z>>>26)|0,Z&=67108863,D=Math.imul(l0,L),h=Math.imul(l0,V),h=h+Math.imul(He,L)|0,E=Math.imul(He,V);var G=(N+D|0)+((h&8191)<<13)|0;return N=(E+(h>>>13)|0)+(G>>>26)|0,G&=67108863,z[0]=ne,z[1]=fe,z[2]=he,z[3]=te,z[4]=xe,z[5]=ue,z[6]=ve,z[7]=ge,z[8]=me,z[9]=_e,z[10]=pe,z[11]=de,z[12]=ye,z[13]=oe,z[14]=le,z[15]=be,z[16]=se,z[17]=Z,z[18]=G,N!==0&&(z[19]=N,g.length++),g};Math.imul||(R=w);function P(A,n,d){d.negative=n.negative^A.negative,d.length=A.length+n.length;for(var g=0,B=0,S=0;S<d.length-1;S++){var z=B;B=0;for(var N=g&67108863,D=Math.min(S,n.length-1),h=Math.max(0,S-A.length+1);h<=D;h++){var E=S-h,K=A.words[E]|0,j=n.words[h]|0,W=K*j,re=W&67108863;z=z+(W/67108864|0)|0,re=re+N|0,N=re&67108863,z=z+(re>>>26)|0,B+=z>>>26,z&=67108863}d.words[S]=N,g=z,z=B}return g!==0?d.words[S]=g:d.length--,d.strip()}function q(A,n,d){var g=new F;return g.mulp(A,n,d)}i.prototype.mulTo=function(n,d){var g,B=this.length+n.length;return this.length===10&&n.length===10?g=R(this,n,d):B<63?g=w(this,n,d):B<1024?g=P(this,n,d):g=q(this,n,d),g};function F(A,n){this.x=A,this.y=n}F.prototype.makeRBT=function(n){for(var d=new Array(n),g=i.prototype._countBits(n)-1,B=0;B<n;B++)d[B]=this.revBin(B,g,n);return d},F.prototype.revBin=function(n,d,g){if(n===0||n===g-1)return n;for(var B=0,S=0;S<d;S++)B|=(n&1)<<d-S-1,n>>=1;return B},F.prototype.permute=function(n,d,g,B,S,z){for(var N=0;N<z;N++)B[N]=d[n[N]],S[N]=g[n[N]]},F.prototype.transform=function(n,d,g,B,S,z){this.permute(z,n,d,g,B,S);for(var N=1;N<S;N<<=1)for(var D=N<<1,h=Math.cos(2*Math.PI/D),E=Math.sin(2*Math.PI/D),K=0;K<S;K+=D)for(var j=h,W=E,re=0;re<N;re++){var ce=g[K+re],we=B[K+re],Ae=g[K+re+N],Me=B[K+re+N],Se=j*Ae-W*Me;Me=j*Me+W*Ae,Ae=Se,g[K+re]=ce+Ae,B[K+re]=we+Me,g[K+re+N]=ce-Ae,B[K+re+N]=we-Me,re!==D&&(Se=h*j-E*W,W=h*W+E*j,j=Se)}},F.prototype.guessLen13b=function(n,d){var g=Math.max(d,n)|1,B=g&1,S=0;for(g=g/2|0;g;g=g>>>1)S++;return 1<<S+1+B},F.prototype.conjugate=function(n,d,g){if(!(g<=1))for(var B=0;B<g/2;B++){var S=n[B];n[B]=n[g-B-1],n[g-B-1]=S,S=d[B],d[B]=-d[g-B-1],d[g-B-1]=-S}},F.prototype.normalize13b=function(n,d){for(var g=0,B=0;B<d/2;B++){var S=Math.round(n[2*B+1]/d)*8192+Math.round(n[2*B]/d)+g;n[B]=S&67108863,S<67108864?g=0:g=S/67108864|0}return n},F.prototype.convert13b=function(n,d,g,B){for(var S=0,z=0;z<d;z++)S=S+(n[z]|0),g[2*z]=S&8191,S=S>>>13,g[2*z+1]=S&8191,S=S>>>13;for(z=2*d;z<B;++z)g[z]=0;r(S===0),r((S&-8192)===0)},F.prototype.stub=function(n){for(var d=new Array(n),g=0;g<n;g++)d[g]=0;return d},F.prototype.mulp=function(n,d,g){var B=2*this.guessLen13b(n.length,d.length),S=this.makeRBT(B),z=this.stub(B),N=new Array(B),D=new Array(B),h=new Array(B),E=new Array(B),K=new Array(B),j=new Array(B),W=g.words;W.length=B,this.convert13b(n.words,n.length,N,B),this.convert13b(d.words,d.length,E,B),this.transform(N,z,D,h,B,S),this.transform(E,z,K,j,B,S);for(var re=0;re<B;re++){var ce=D[re]*K[re]-h[re]*j[re];h[re]=D[re]*j[re]+h[re]*K[re],D[re]=ce}return this.conjugate(D,h,B),this.transform(D,h,W,z,B,S),this.conjugate(W,z,B),this.normalize13b(W,B),g.negative=n.negative^d.negative,g.length=n.length+d.length,g.strip()},i.prototype.mul=function(n){var d=new i(null);return d.words=new Array(this.length+n.length),this.mulTo(n,d)},i.prototype.mulf=function(n){var d=new i(null);return d.words=new Array(this.length+n.length),q(this,n,d)},i.prototype.imul=function(n){return this.clone().mulTo(n,this)},i.prototype.imuln=function(n){r(typeof n=="number"),r(n<67108864);for(var d=0,g=0;g<this.length;g++){var B=(this.words[g]|0)*n,S=(B&67108863)+(d&67108863);d>>=26,d+=B/67108864|0,d+=S>>>26,this.words[g]=S&67108863}return d!==0&&(this.words[g]=d,this.length++),this},i.prototype.muln=function(n){return this.clone().imuln(n)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(n){var d=C(n);if(d.length===0)return new i(1);for(var g=this,B=0;B<d.length&&d[B]===0;B++,g=g.sqr());if(++B<d.length)for(var S=g.sqr();B<d.length;B++,S=S.sqr())d[B]!==0&&(g=g.mul(S));return g},i.prototype.iushln=function(n){r(typeof n=="number"&&n>=0);var d=n%26,g=(n-d)/26,B=67108863>>>26-d<<26-d,S;if(d!==0){var z=0;for(S=0;S<this.length;S++){var N=this.words[S]&B,D=(this.words[S]|0)-N<<d;this.words[S]=D|z,z=N>>>26-d}z&&(this.words[S]=z,this.length++)}if(g!==0){for(S=this.length-1;S>=0;S--)this.words[S+g]=this.words[S];for(S=0;S<g;S++)this.words[S]=0;this.length+=g}return this.strip()},i.prototype.ishln=function(n){return r(this.negative===0),this.iushln(n)},i.prototype.iushrn=function(n,d,g){r(typeof n=="number"&&n>=0);var B;d?B=(d-d%26)/26:B=0;var S=n%26,z=Math.min((n-S)/26,this.length),N=67108863^67108863>>>S<<S,D=g;if(B-=z,B=Math.max(0,B),D){for(var h=0;h<z;h++)D.words[h]=this.words[h];D.length=z}if(z!==0)if(this.length>z)for(this.length-=z,h=0;h<this.length;h++)this.words[h]=this.words[h+z];else this.words[0]=0,this.length=1;var E=0;for(h=this.length-1;h>=0&&(E!==0||h>=B);h--){var K=this.words[h]|0;this.words[h]=E<<26-S|K>>>S,E=K&N}return D&&E!==0&&(D.words[D.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(n,d,g){return r(this.negative===0),this.iushrn(n,d,g)},i.prototype.shln=function(n){return this.clone().ishln(n)},i.prototype.ushln=function(n){return this.clone().iushln(n)},i.prototype.shrn=function(n){return this.clone().ishrn(n)},i.prototype.ushrn=function(n){return this.clone().iushrn(n)},i.prototype.testn=function(n){r(typeof n=="number"&&n>=0);var d=n%26,g=(n-d)/26,B=1<<d;if(this.length<=g)return!1;var S=this.words[g];return!!(S&B)},i.prototype.imaskn=function(n){r(typeof n=="number"&&n>=0);var d=n%26,g=(n-d)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(d!==0&&g++,this.length=Math.min(g,this.length),d!==0){var B=67108863^67108863>>>d<<d;this.words[this.length-1]&=B}return this.strip()},i.prototype.maskn=function(n){return this.clone().imaskn(n)},i.prototype.iaddn=function(n){return r(typeof n=="number"),r(n<67108864),n<0?this.isubn(-n):this.negative!==0?this.length===1&&(this.words[0]|0)<n?(this.words[0]=n-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(n),this.negative=1,this):this._iaddn(n)},i.prototype._iaddn=function(n){this.words[0]+=n;for(var d=0;d<this.length&&this.words[d]>=67108864;d++)this.words[d]-=67108864,d===this.length-1?this.words[d+1]=1:this.words[d+1]++;return this.length=Math.max(this.length,d+1),this},i.prototype.isubn=function(n){if(r(typeof n=="number"),r(n<67108864),n<0)return this.iaddn(-n);if(this.negative!==0)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var d=0;d<this.length&&this.words[d]<0;d++)this.words[d]+=67108864,this.words[d+1]-=1;return this.strip()},i.prototype.addn=function(n){return this.clone().iaddn(n)},i.prototype.subn=function(n){return this.clone().isubn(n)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(n,d,g){var B=n.length+g,S;this._expand(B);var z,N=0;for(S=0;S<n.length;S++){z=(this.words[S+g]|0)+N;var D=(n.words[S]|0)*d;z-=D&67108863,N=(z>>26)-(D/67108864|0),this.words[S+g]=z&67108863}for(;S<this.length-g;S++)z=(this.words[S+g]|0)+N,N=z>>26,this.words[S+g]=z&67108863;if(N===0)return this.strip();for(r(N===-1),N=0,S=0;S<this.length;S++)z=-(this.words[S]|0)+N,N=z>>26,this.words[S]=z&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(n,d){var g=this.length-n.length,B=this.clone(),S=n,z=S.words[S.length-1]|0,N=this._countBits(z);g=26-N,g!==0&&(S=S.ushln(g),B.iushln(g),z=S.words[S.length-1]|0);var D=B.length-S.length,h;if(d!=="mod"){h=new i(null),h.length=D+1,h.words=new Array(h.length);for(var E=0;E<h.length;E++)h.words[E]=0}var K=B.clone()._ishlnsubmul(S,1,D);K.negative===0&&(B=K,h&&(h.words[D]=1));for(var j=D-1;j>=0;j--){var W=(B.words[S.length+j]|0)*67108864+(B.words[S.length+j-1]|0);for(W=Math.min(W/z|0,67108863),B._ishlnsubmul(S,W,j);B.negative!==0;)W--,B.negative=0,B._ishlnsubmul(S,1,j),B.isZero()||(B.negative^=1);h&&(h.words[j]=W)}return h&&h.strip(),B.strip(),d!=="div"&&g!==0&&B.iushrn(g),{div:h||null,mod:B}},i.prototype.divmod=function(n,d,g){if(r(!n.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var B,S,z;return this.negative!==0&&n.negative===0?(z=this.neg().divmod(n,d),d!=="mod"&&(B=z.div.neg()),d!=="div"&&(S=z.mod.neg(),g&&S.negative!==0&&S.iadd(n)),{div:B,mod:S}):this.negative===0&&n.negative!==0?(z=this.divmod(n.neg(),d),d!=="mod"&&(B=z.div.neg()),{div:B,mod:z.mod}):this.negative&n.negative?(z=this.neg().divmod(n.neg(),d),d!=="div"&&(S=z.mod.neg(),g&&S.negative!==0&&S.isub(n)),{div:z.div,mod:S}):n.length>this.length||this.cmp(n)<0?{div:new i(0),mod:this}:n.length===1?d==="div"?{div:this.divn(n.words[0]),mod:null}:d==="mod"?{div:null,mod:new i(this.modn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new i(this.modn(n.words[0]))}:this._wordDiv(n,d)},i.prototype.div=function(n){return this.divmod(n,"div",!1).div},i.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},i.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},i.prototype.divRound=function(n){var d=this.divmod(n);if(d.mod.isZero())return d.div;var g=d.div.negative!==0?d.mod.isub(n):d.mod,B=n.ushrn(1),S=n.andln(1),z=g.cmp(B);return z<0||S===1&&z===0?d.div:d.div.negative!==0?d.div.isubn(1):d.div.iaddn(1)},i.prototype.modn=function(n){r(n<=67108863);for(var d=(1<<26)%n,g=0,B=this.length-1;B>=0;B--)g=(d*g+(this.words[B]|0))%n;return g},i.prototype.idivn=function(n){r(n<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var B=(this.words[g]|0)+d*67108864;this.words[g]=B/n|0,d=B%n}return this.strip()},i.prototype.divn=function(n){return this.clone().idivn(n)},i.prototype.egcd=function(n){r(n.negative===0),r(!n.isZero());var d=this,g=n.clone();d.negative!==0?d=d.umod(n):d=d.clone();for(var B=new i(1),S=new i(0),z=new i(0),N=new i(1),D=0;d.isEven()&&g.isEven();)d.iushrn(1),g.iushrn(1),++D;for(var h=g.clone(),E=d.clone();!d.isZero();){for(var K=0,j=1;!(d.words[0]&j)&&K<26;++K,j<<=1);if(K>0)for(d.iushrn(K);K-- >0;)(B.isOdd()||S.isOdd())&&(B.iadd(h),S.isub(E)),B.iushrn(1),S.iushrn(1);for(var W=0,re=1;!(g.words[0]&re)&&W<26;++W,re<<=1);if(W>0)for(g.iushrn(W);W-- >0;)(z.isOdd()||N.isOdd())&&(z.iadd(h),N.isub(E)),z.iushrn(1),N.iushrn(1);d.cmp(g)>=0?(d.isub(g),B.isub(z),S.isub(N)):(g.isub(d),z.isub(B),N.isub(S))}return{a:z,b:N,gcd:g.iushln(D)}},i.prototype._invmp=function(n){r(n.negative===0),r(!n.isZero());var d=this,g=n.clone();d.negative!==0?d=d.umod(n):d=d.clone();for(var B=new i(1),S=new i(0),z=g.clone();d.cmpn(1)>0&&g.cmpn(1)>0;){for(var N=0,D=1;!(d.words[0]&D)&&N<26;++N,D<<=1);if(N>0)for(d.iushrn(N);N-- >0;)B.isOdd()&&B.iadd(z),B.iushrn(1);for(var h=0,E=1;!(g.words[0]&E)&&h<26;++h,E<<=1);if(h>0)for(g.iushrn(h);h-- >0;)S.isOdd()&&S.iadd(z),S.iushrn(1);d.cmp(g)>=0?(d.isub(g),B.isub(S)):(g.isub(d),S.isub(B))}var K;return d.cmpn(1)===0?K=B:K=S,K.cmpn(0)<0&&K.iadd(n),K},i.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var d=this.clone(),g=n.clone();d.negative=0,g.negative=0;for(var B=0;d.isEven()&&g.isEven();B++)d.iushrn(1),g.iushrn(1);do{for(;d.isEven();)d.iushrn(1);for(;g.isEven();)g.iushrn(1);var S=d.cmp(g);if(S<0){var z=d;d=g,g=z}else if(S===0||g.cmpn(1)===0)break;d.isub(g)}while(!0);return g.iushln(B)},i.prototype.invm=function(n){return this.egcd(n).a.umod(n)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(n){return this.words[0]&n},i.prototype.bincn=function(n){r(typeof n=="number");var d=n%26,g=(n-d)/26,B=1<<d;if(this.length<=g)return this._expand(g+1),this.words[g]|=B,this;for(var S=B,z=g;S!==0&&z<this.length;z++){var N=this.words[z]|0;N+=S,S=N>>>26,N&=67108863,this.words[z]=N}return S!==0&&(this.words[z]=S,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(n){var d=n<0;if(this.negative!==0&&!d)return-1;if(this.negative===0&&d)return 1;this.strip();var g;if(this.length>1)g=1;else{d&&(n=-n),r(n<=67108863,"Number is too big");var B=this.words[0]|0;g=B===n?0:B<n?-1:1}return this.negative!==0?-g|0:g},i.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var d=this.ucmp(n);return this.negative!==0?-d|0:d},i.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var d=0,g=this.length-1;g>=0;g--){var B=this.words[g]|0,S=n.words[g]|0;if(B!==S){B<S?d=-1:B>S&&(d=1);break}}return d},i.prototype.gtn=function(n){return this.cmpn(n)===1},i.prototype.gt=function(n){return this.cmp(n)===1},i.prototype.gten=function(n){return this.cmpn(n)>=0},i.prototype.gte=function(n){return this.cmp(n)>=0},i.prototype.ltn=function(n){return this.cmpn(n)===-1},i.prototype.lt=function(n){return this.cmp(n)===-1},i.prototype.lten=function(n){return this.cmpn(n)<=0},i.prototype.lte=function(n){return this.cmp(n)<=0},i.prototype.eqn=function(n){return this.cmpn(n)===0},i.prototype.eq=function(n){return this.cmp(n)===0},i.red=function(n){return new Q(n)},i.prototype.toRed=function(n){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(n){return this.red=n,this},i.prototype.forceRed=function(n){return r(!this.red,"Already a number in reduction context"),this._forceRed(n)},i.prototype.redAdd=function(n){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},i.prototype.redIAdd=function(n){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},i.prototype.redSub=function(n){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},i.prototype.redISub=function(n){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},i.prototype.redShl=function(n){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},i.prototype.redMul=function(n){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},i.prototype.redIMul=function(n){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(n){return r(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var k={k256:null,p224:null,p192:null,p25519:null};function T(A,n){this.name=A,this.p=new i(n,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}T.prototype._tmp=function(){var n=new i(null);return n.words=new Array(Math.ceil(this.n/13)),n},T.prototype.ireduce=function(n){var d=n,g;do this.split(d,this.tmp),d=this.imulK(d),d=d.iadd(this.tmp),g=d.bitLength();while(g>this.n);var B=g<this.n?-1:d.ucmp(this.p);return B===0?(d.words[0]=0,d.length=1):B>0?d.isub(this.p):d.strip!==void 0?d.strip():d._strip(),d},T.prototype.split=function(n,d){n.iushrn(this.n,0,d)},T.prototype.imulK=function(n){return n.imul(this.k)};function H(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(H,T),H.prototype.split=function(n,d){for(var g=4194303,B=Math.min(n.length,9),S=0;S<B;S++)d.words[S]=n.words[S];if(d.length=B,n.length<=9){n.words[0]=0,n.length=1;return}var z=n.words[9];for(d.words[d.length++]=z&g,S=10;S<n.length;S++){var N=n.words[S]|0;n.words[S-10]=(N&g)<<4|z>>>22,z=N}z>>>=22,n.words[S-10]=z,z===0&&n.length>10?n.length-=10:n.length-=9},H.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var d=0,g=0;g<n.length;g++){var B=n.words[g]|0;d+=B*977,n.words[g]=d&67108863,d=B*64+(d/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function $(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}a($,T);function Y(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}a(Y,T);function X(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}a(X,T),X.prototype.imulK=function(n){for(var d=0,g=0;g<n.length;g++){var B=(n.words[g]|0)*19+d,S=B&67108863;B>>>=26,n.words[g]=S,d=B}return d!==0&&(n.words[n.length++]=d),n},i._prime=function(n){if(k[n])return k[n];var d;if(n==="k256")d=new H;else if(n==="p224")d=new $;else if(n==="p192")d=new Y;else if(n==="p25519")d=new X;else throw new Error("Unknown prime "+n);return k[n]=d,d};function Q(A){if(typeof A=="string"){var n=i._prime(A);this.m=n.p,this.prime=n}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}Q.prototype._verify1=function(n){r(n.negative===0,"red works only with positives"),r(n.red,"red works only with red numbers")},Q.prototype._verify2=function(n,d){r((n.negative|d.negative)===0,"red works only with positives"),r(n.red&&n.red===d.red,"red works only with red numbers")},Q.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):n.umod(this.m)._forceRed(this)},Q.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},Q.prototype.add=function(n,d){this._verify2(n,d);var g=n.add(d);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},Q.prototype.iadd=function(n,d){this._verify2(n,d);var g=n.iadd(d);return g.cmp(this.m)>=0&&g.isub(this.m),g},Q.prototype.sub=function(n,d){this._verify2(n,d);var g=n.sub(d);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},Q.prototype.isub=function(n,d){this._verify2(n,d);var g=n.isub(d);return g.cmpn(0)<0&&g.iadd(this.m),g},Q.prototype.shl=function(n,d){return this._verify1(n),this.imod(n.ushln(d))},Q.prototype.imul=function(n,d){return this._verify2(n,d),this.imod(n.imul(d))},Q.prototype.mul=function(n,d){return this._verify2(n,d),this.imod(n.mul(d))},Q.prototype.isqr=function(n){return this.imul(n,n.clone())},Q.prototype.sqr=function(n){return this.mul(n,n)},Q.prototype.sqrt=function(n){if(n.isZero())return n.clone();var d=this.m.andln(3);if(r(d%2===1),d===3){var g=this.m.add(new i(1)).iushrn(2);return this.pow(n,g)}for(var B=this.m.subn(1),S=0;!B.isZero()&&B.andln(1)===0;)S++,B.iushrn(1);r(!B.isZero());var z=new i(1).toRed(this),N=z.redNeg(),D=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);this.pow(h,D).cmp(N)!==0;)h.redIAdd(N);for(var E=this.pow(h,B),K=this.pow(n,B.addn(1).iushrn(1)),j=this.pow(n,B),W=S;j.cmp(z)!==0;){for(var re=j,ce=0;re.cmp(z)!==0;ce++)re=re.redSqr();r(ce<W);var we=this.pow(E,new i(1).iushln(W-ce-1));K=K.redMul(we),E=we.redSqr(),j=j.redMul(E),W=ce}return K},Q.prototype.invm=function(n){var d=n._invmp(this.m);return d.negative!==0?(d.negative=0,this.imod(d).redNeg()):this.imod(d)},Q.prototype.pow=function(n,d){if(d.isZero())return new i(1).toRed(this);if(d.cmpn(1)===0)return n.clone();var g=4,B=new Array(1<<g);B[0]=new i(1).toRed(this),B[1]=n;for(var S=2;S<B.length;S++)B[S]=this.mul(B[S-1],n);var z=B[0],N=0,D=0,h=d.bitLength()%26;for(h===0&&(h=26),S=d.length-1;S>=0;S--){for(var E=d.words[S],K=h-1;K>=0;K--){var j=E>>K&1;if(z!==B[0]&&(z=this.sqr(z)),j===0&&N===0){D=0;continue}N<<=1,N|=j,D++,!(D!==g&&(S!==0||K!==0))&&(z=this.mul(z,B[N]),D=0,N=0)}h=26}return z},Q.prototype.convertTo=function(n){var d=n.umod(this.m);return d===n?d.clone():d},Q.prototype.convertFrom=function(n){var d=n.clone();return d.red=null,d},i.mont=function(n){return new U(n)};function U(A){Q.call(this,A),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(U,Q),U.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},U.prototype.convertFrom=function(n){var d=this.imod(n.mul(this.rinv));return d.red=null,d},U.prototype.imul=function(n,d){if(n.isZero()||d.isZero())return n.words[0]=0,n.length=1,n;var g=n.imul(d),B=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=g.isub(B).iushrn(this.shift),z=S;return S.cmp(this.m)>=0?z=S.isub(this.m):S.cmpn(0)<0&&(z=S.iadd(this.m)),z._forceRed(this)},U.prototype.mul=function(n,d){if(n.isZero()||d.isZero())return new i(0)._forceRed(this);var g=n.mul(d),B=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=g.isub(B).iushrn(this.shift),z=S;return S.cmp(this.m)>=0?z=S.isub(this.m):S.cmpn(0)<0&&(z=S.iadd(this.m)),z._forceRed(this)},U.prototype.invm=function(n){var d=this.imod(n._invmp(this.m).mul(this.r2));return d._forceRed(this)}})(f,ke)})(Lf);var pt=Lf.exports,It=pn;function pn(f,e){if(!f)throw new Error(e||"Assertion failed")}pn.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Hf={};(function(f){var e=f;function t(i,y){if(Array.isArray(i))return i.slice();if(!i)return[];var x=[];if(typeof i!="string"){for(var u=0;u<i.length;u++)x[u]=i[u]|0;return x}if(y==="hex"){i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i);for(var u=0;u<i.length;u+=2)x.push(parseInt(i[u]+i[u+1],16))}else for(var u=0;u<i.length;u++){var o=i.charCodeAt(u),c=o>>8,v=o&255;c?x.push(c,v):x.push(v)}return x}e.toArray=t;function r(i){return i.length===1?"0"+i:i}e.zero2=r;function a(i){for(var y="",x=0;x<i.length;x++)y+=r(i[x].toString(16));return y}e.toHex=a,e.encode=function(y,x){return x==="hex"?a(y):y}})(Hf);(function(f){var e=f,t=pt,r=It,a=Hf;e.assert=r,e.toArray=a.toArray,e.zero2=a.zero2,e.toHex=a.toHex,e.encode=a.encode;function i(c,v,b){var C=new Array(Math.max(c.bitLength(),b)+1),w;for(w=0;w<C.length;w+=1)C[w]=0;var R=1<<v+1,P=c.clone();for(w=0;w<C.length;w++){var q,F=P.andln(R-1);P.isOdd()?(F>(R>>1)-1?q=(R>>1)-F:q=F,P.isubn(q)):q=0,C[w]=q,P.iushrn(1)}return C}e.getNAF=i;function y(c,v){var b=[[],[]];c=c.clone(),v=v.clone();for(var C=0,w=0,R;c.cmpn(-C)>0||v.cmpn(-w)>0;){var P=c.andln(3)+C&3,q=v.andln(3)+w&3;P===3&&(P=-1),q===3&&(q=-1);var F;P&1?(R=c.andln(7)+C&7,(R===3||R===5)&&q===2?F=-P:F=P):F=0,b[0].push(F);var k;q&1?(R=v.andln(7)+w&7,(R===3||R===5)&&P===2?k=-q:k=q):k=0,b[1].push(k),2*C===F+1&&(C=1-C),2*w===k+1&&(w=1-w),c.iushrn(1),v.iushrn(1)}return b}e.getJSF=y;function x(c,v,b){var C="_"+v;c.prototype[v]=function(){return this[C]!==void 0?this[C]:this[C]=b.call(this)}}e.cachedProperty=x;function u(c){return typeof c=="string"?e.toArray(c,"hex"):c}e.parseBytes=u;function o(c){return new t(c,"hex","le")}e.intFromLE=o})(j0);var Uf={exports:{}},bf;Uf.exports=function(e){return bf||(bf=new mt(null)),bf.generate(e)};function mt(f){this.rand=f}Uf.exports.Rand=mt;mt.prototype.generate=function(e){return this._rand(e)};mt.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?mt.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?mt.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&(mt.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var qi=mr;if(typeof qi.randomBytes!="function")throw new Error("Not supported");mt.prototype._rand=function(e){return qi.randomBytes(e)}}catch{}var yn=Uf.exports,$f={},Bt=pt,ir=j0,pr=ir.getNAF,ls=ir.getJSF,yr=ir.assert;function Et(f,e){this.type=f,this.p=new Bt(e.p,16),this.red=e.prime?Bt.red(e.prime):Bt.mont(this.p),this.zero=new Bt(0).toRed(this.red),this.one=new Bt(1).toRed(this.red),this.two=new Bt(2).toRed(this.red),this.n=e.n&&new Bt(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ar=Et;Et.prototype.point=function(){throw new Error("Not implemented")};Et.prototype.validate=function(){throw new Error("Not implemented")};Et.prototype._fixedNafMul=function(e,t){yr(e.precomputed);var r=e._getDoubles(),a=pr(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var y=[],x,u;for(x=0;x<a.length;x+=r.step){u=0;for(var o=x+r.step-1;o>=x;o--)u=(u<<1)+a[o];y.push(u)}for(var c=this.jpoint(null,null,null),v=this.jpoint(null,null,null),b=i;b>0;b--){for(x=0;x<y.length;x++)u=y[x],u===b?v=v.mixedAdd(r.points[x]):u===-b&&(v=v.mixedAdd(r.points[x].neg()));c=c.add(v)}return c.toP()};Et.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var i=a.points,y=pr(t,r,this._bitLength),x=this.jpoint(null,null,null),u=y.length-1;u>=0;u--){for(var o=0;u>=0&&y[u]===0;u--)o++;if(u>=0&&o++,x=x.dblp(o),u<0)break;var c=y[u];yr(c!==0),e.type==="affine"?c>0?x=x.mixedAdd(i[c-1>>1]):x=x.mixedAdd(i[-c-1>>1].neg()):c>0?x=x.add(i[c-1>>1]):x=x.add(i[-c-1>>1].neg())}return e.type==="affine"?x.toP():x};Et.prototype._wnafMulAdd=function(e,t,r,a,i){var y=this._wnafT1,x=this._wnafT2,u=this._wnafT3,o=0,c,v,b;for(c=0;c<a;c++){b=t[c];var C=b._getNAFPoints(e);y[c]=C.wnd,x[c]=C.points}for(c=a-1;c>=1;c-=2){var w=c-1,R=c;if(y[w]!==1||y[R]!==1){u[w]=pr(r[w],y[w],this._bitLength),u[R]=pr(r[R],y[R],this._bitLength),o=Math.max(u[w].length,o),o=Math.max(u[R].length,o);continue}var P=[t[w],null,null,t[R]];t[w].y.cmp(t[R].y)===0?(P[1]=t[w].add(t[R]),P[2]=t[w].toJ().mixedAdd(t[R].neg())):t[w].y.cmp(t[R].y.redNeg())===0?(P[1]=t[w].toJ().mixedAdd(t[R]),P[2]=t[w].add(t[R].neg())):(P[1]=t[w].toJ().mixedAdd(t[R]),P[2]=t[w].toJ().mixedAdd(t[R].neg()));var q=[-3,-1,-5,-7,0,7,5,1,3],F=ls(r[w],r[R]);for(o=Math.max(F[0].length,o),u[w]=new Array(o),u[R]=new Array(o),v=0;v<o;v++){var k=F[0][v]|0,T=F[1][v]|0;u[w][v]=q[(k+1)*3+(T+1)],u[R][v]=0,x[w]=P}}var H=this.jpoint(null,null,null),$=this._wnafT4;for(c=o;c>=0;c--){for(var Y=0;c>=0;){var X=!0;for(v=0;v<a;v++)$[v]=u[v][c]|0,$[v]!==0&&(X=!1);if(!X)break;Y++,c--}if(c>=0&&Y++,H=H.dblp(Y),c<0)break;for(v=0;v<a;v++){var Q=$[v];Q!==0&&(Q>0?b=x[v][Q-1>>1]:Q<0&&(b=x[v][-Q-1>>1].neg()),b.type==="affine"?H=H.mixedAdd(b):H=H.add(b))}}for(c=0;c<a;c++)x[c]=null;return i?H:H.toP()};function X0(f,e){this.curve=f,this.type=e,this.precomputed=null}Et.BasePoint=X0;X0.prototype.eq=function(){throw new Error("Not implemented")};X0.prototype.validate=function(){return this.curve.validate(this)};Et.prototype.decodePoint=function(e,t){e=ir.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){e[0]===6?yr(e[e.length-1]%2===0):e[0]===7&&yr(e[e.length-1]%2===1);var a=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return a}else if((e[0]===2||e[0]===3)&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),e[0]===3);throw new Error("Unknown point format")};X0.prototype.encodeCompressed=function(e){return this.encode(e,!0)};X0.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))};X0.prototype.encode=function(e,t){return ir.encode(this._encode(t),e)};X0.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this};X0.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return t?t.points.length>=Math.ceil((e.bitLength()+1)/t.step):!1};X0.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,i=0;i<t;i+=e){for(var y=0;y<e;y++)a=a.dbl();r.push(a)}return{step:e,points:r}};X0.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,a=r===1?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(a);return{wnd:e,points:t}};X0.prototype._getBeta=function(){return null};X0.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Mf={exports:{}};typeof Object.create=="function"?Mf.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Mf.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var Er=Mf.exports,xs=j0,g0=pt,Wf=Er,Ut=Ar,vs=xs.assert;function Z0(f){Ut.call(this,"short",f),this.a=new g0(f.a,16).toRed(this.red),this.b=new g0(f.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(f),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Wf(Z0,Ut);var bs=Z0;Z0.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,r;if(e.beta)t=new g0(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=a[0].cmp(a[1])<0?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new g0(e.lambda,16);else{var i=this._getEndoRoots(this.n);this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))===0?r=i[0]:(r=i[1],vs(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0))}var y;return e.basis?y=e.basis.map(function(x){return{a:new g0(x.a,16),b:new g0(x.b,16)}}):y=this._getEndoBasis(r),{beta:t,lambda:r,basis:y}}};Z0.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:g0.mont(e),r=new g0(2).toRed(t).redInvm(),a=r.redNeg(),i=new g0(3).toRed(t).redNeg().redSqrt().redMul(r),y=a.redAdd(i).fromRed(),x=a.redSub(i).fromRed();return[y,x]};Z0.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=e,a=this.n.clone(),i=new g0(1),y=new g0(0),x=new g0(0),u=new g0(1),o,c,v,b,C,w,R,P=0,q,F;r.cmpn(0)!==0;){var k=a.div(r);q=a.sub(k.mul(r)),F=x.sub(k.mul(i));var T=u.sub(k.mul(y));if(!v&&q.cmp(t)<0)o=R.neg(),c=i,v=q.neg(),b=F;else if(v&&++P===2)break;R=q,a=r,r=q,x=i,i=F,u=y,y=T}C=q.neg(),w=F;var H=v.sqr().add(b.sqr()),$=C.sqr().add(w.sqr());return $.cmp(H)>=0&&(C=o,w=c),v.negative&&(v=v.neg(),b=b.neg()),C.negative&&(C=C.neg(),w=w.neg()),[{a:v,b},{a:C,b:w}]};Z0.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],i=a.b.mul(e).divRound(this.n),y=r.b.neg().mul(e).divRound(this.n),x=i.mul(r.a),u=y.mul(a.a),o=i.mul(r.b),c=y.mul(a.b),v=e.sub(x).sub(u),b=o.add(c).neg();return{k1:v,k2:b}};Z0.prototype.pointFromX=function(e,t){e=new g0(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(a.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var i=a.fromRed().isOdd();return(t&&!i||!t&&i)&&(a=a.redNeg()),this.point(e,a)};Z0.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return r.redSqr().redISub(i).cmpn(0)===0};Z0.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,i=this._endoWnafT2,y=0;y<e.length;y++){var x=this._endoSplit(t[y]),u=e[y],o=u._getBeta();x.k1.negative&&(x.k1.ineg(),u=u.neg(!0)),x.k2.negative&&(x.k2.ineg(),o=o.neg(!0)),a[y*2]=u,a[y*2+1]=o,i[y*2]=x.k1,i[y*2+1]=x.k2}for(var c=this._wnafMulAdd(1,a,i,y*2,r),v=0;v<y*2;v++)a[v]=null,i[v]=null;return c};function M0(f,e,t,r){Ut.BasePoint.call(this,f,"affine"),e===null&&t===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new g0(e,16),this.y=new g0(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Wf(M0,Ut.BasePoint);Z0.prototype.point=function(e,t,r){return new M0(this,e,t,r)};Z0.prototype.pointFromJSON=function(e,t){return M0.fromJSON(this,e,t)};M0.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,a=function(i){return r.point(i.x.redMul(r.endo.beta),i.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return t}};M0.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};M0.fromJSON=function(e,t,r){typeof t=="string"&&(t=JSON.parse(t));var a=e.point(t[0],t[1],r);if(!t[2])return a;function i(x){return e.point(x[0],x[1],r)}var y=t[2];return a.precomputed={beta:null,doubles:y.doubles&&{step:y.doubles.step,points:[a].concat(y.doubles.points.map(i))},naf:y.naf&&{wnd:y.naf.wnd,points:[a].concat(y.naf.points.map(i))}},a};M0.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};M0.prototype.isInfinity=function(){return this.inf};M0.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)};M0.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),y=i.redSqr().redISub(this.x.redAdd(this.x)),x=i.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,x)};M0.prototype.getX=function(){return this.x.fromRed()};M0.prototype.getY=function(){return this.y.fromRed()};M0.prototype.mul=function(e){return e=new g0(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};M0.prototype.mulAdd=function(e,t,r){var a=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,i):this.curve._wnafMulAdd(1,a,i,2)};M0.prototype.jmulAdd=function(e,t,r){var a=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,i,!0):this.curve._wnafMulAdd(1,a,i,2,!0)};M0.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};M0.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,a=function(i){return i.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t};M0.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function R0(f,e,t,r){Ut.BasePoint.call(this,f,"jacobian"),e===null&&t===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new g0(0)):(this.x=new g0(e,16),this.y=new g0(t,16),this.z=new g0(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wf(R0,Ut.BasePoint);Z0.prototype.jpoint=function(e,t,r){return new R0(this,e,t,r)};R0.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)};R0.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};R0.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(t),i=e.x.redMul(r),y=this.y.redMul(t.redMul(e.z)),x=e.y.redMul(r.redMul(this.z)),u=a.redSub(i),o=y.redSub(x);if(u.cmpn(0)===0)return o.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=u.redSqr(),v=c.redMul(u),b=a.redMul(c),C=o.redSqr().redIAdd(v).redISub(b).redISub(b),w=o.redMul(b.redISub(C)).redISub(y.redMul(v)),R=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(C,w,R)};R0.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,a=e.x.redMul(t),i=this.y,y=e.y.redMul(t).redMul(this.z),x=r.redSub(a),u=i.redSub(y);if(x.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var o=x.redSqr(),c=o.redMul(x),v=r.redMul(o),b=u.redSqr().redIAdd(c).redISub(v).redISub(v),C=u.redMul(v.redISub(b)).redISub(i.redMul(c)),w=this.z.redMul(x);return this.curve.jpoint(b,C,w)};R0.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var a=this.curve.a,i=this.curve.tinv,y=this.x,x=this.y,u=this.z,o=u.redSqr().redSqr(),c=x.redAdd(x);for(t=0;t<e;t++){var v=y.redSqr(),b=c.redSqr(),C=b.redSqr(),w=v.redAdd(v).redIAdd(v).redIAdd(a.redMul(o)),R=y.redMul(b),P=w.redSqr().redISub(R.redAdd(R)),q=R.redISub(P),F=w.redMul(q);F=F.redIAdd(F).redISub(C);var k=c.redMul(u);t+1<e&&(o=o.redMul(C)),y=P,u=k,c=F}return this.curve.jpoint(y,c.redMul(i),u)};R0.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};R0.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),i=this.y.redSqr(),y=i.redSqr(),x=this.x.redAdd(i).redSqr().redISub(a).redISub(y);x=x.redIAdd(x);var u=a.redAdd(a).redIAdd(a),o=u.redSqr().redISub(x).redISub(x),c=y.redIAdd(y);c=c.redIAdd(c),c=c.redIAdd(c),e=o,t=u.redMul(x.redISub(o)).redISub(c),r=this.y.redAdd(this.y)}else{var v=this.x.redSqr(),b=this.y.redSqr(),C=b.redSqr(),w=this.x.redAdd(b).redSqr().redISub(v).redISub(C);w=w.redIAdd(w);var R=v.redAdd(v).redIAdd(v),P=R.redSqr(),q=C.redIAdd(C);q=q.redIAdd(q),q=q.redIAdd(q),e=P.redISub(w).redISub(w),t=R.redMul(w.redISub(e)).redISub(q),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};R0.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var a=this.x.redSqr(),i=this.y.redSqr(),y=i.redSqr(),x=this.x.redAdd(i).redSqr().redISub(a).redISub(y);x=x.redIAdd(x);var u=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),o=u.redSqr().redISub(x).redISub(x);e=o;var c=y.redIAdd(y);c=c.redIAdd(c),c=c.redIAdd(c),t=u.redMul(x.redISub(o)).redISub(c),r=this.y.redAdd(this.y)}else{var v=this.z.redSqr(),b=this.y.redSqr(),C=this.x.redMul(b),w=this.x.redSub(v).redMul(this.x.redAdd(v));w=w.redAdd(w).redIAdd(w);var R=C.redIAdd(C);R=R.redIAdd(R);var P=R.redAdd(R);e=w.redSqr().redISub(P),r=this.y.redAdd(this.z).redSqr().redISub(b).redISub(v);var q=b.redSqr();q=q.redIAdd(q),q=q.redIAdd(q),q=q.redIAdd(q),t=w.redMul(R.redISub(e)).redISub(q)}return this.curve.jpoint(e,t,r)};R0.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,a=this.z,i=a.redSqr().redSqr(),y=t.redSqr(),x=r.redSqr(),u=y.redAdd(y).redIAdd(y).redIAdd(e.redMul(i)),o=t.redAdd(t);o=o.redIAdd(o);var c=o.redMul(x),v=u.redSqr().redISub(c.redAdd(c)),b=c.redISub(v),C=x.redSqr();C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var w=u.redMul(b).redISub(C),R=r.redAdd(r).redMul(a);return this.curve.jpoint(v,w,R)};R0.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),a=t.redSqr(),i=e.redAdd(e).redIAdd(e),y=i.redSqr(),x=this.x.redAdd(t).redSqr().redISub(e).redISub(a);x=x.redIAdd(x),x=x.redAdd(x).redIAdd(x),x=x.redISub(y);var u=x.redSqr(),o=a.redIAdd(a);o=o.redIAdd(o),o=o.redIAdd(o),o=o.redIAdd(o);var c=i.redIAdd(x).redSqr().redISub(y).redISub(u).redISub(o),v=t.redMul(c);v=v.redIAdd(v),v=v.redIAdd(v);var b=this.x.redMul(u).redISub(v);b=b.redIAdd(b),b=b.redIAdd(b);var C=this.y.redMul(c.redMul(o.redISub(c)).redISub(x.redMul(u)));C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var w=this.z.redAdd(x).redSqr().redISub(r).redISub(u);return this.curve.jpoint(b,C,w)};R0.prototype.mul=function(e,t){return e=new g0(e,t),this.curve._wnafMul(this,e)};R0.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var a=t.redMul(this.z),i=r.redMul(e.z);return this.y.redMul(i).redISub(e.y.redMul(a)).cmpn(0)===0};R0.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return!0;for(var a=e.clone(),i=this.curve.redN.redMul(t);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}};R0.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};R0.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var zt=pt,gn=Er,wr=Ar,ps=j0;function $t(f){wr.call(this,"mont",f),this.a=new zt(f.a,16).toRed(this.red),this.b=new zt(f.b,16).toRed(this.red),this.i4=new zt(4).toRed(this.red).redInvm(),this.two=new zt(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}gn($t,wr);var ys=$t;$t.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=a.redSqrt();return i.redSqr().cmp(a)===0};function B0(f,e,t){wr.BasePoint.call(this,f,"projective"),e===null&&t===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new zt(e,16),this.z=new zt(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}gn(B0,wr.BasePoint);$t.prototype.decodePoint=function(e,t){return this.point(ps.toArray(e,t),1)};$t.prototype.point=function(e,t){return new B0(this,e,t)};$t.prototype.pointFromJSON=function(e){return B0.fromJSON(this,e)};B0.prototype.precompute=function(){};B0.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};B0.fromJSON=function(e,t){return new B0(e,t[0],t[1]||e.one)};B0.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};B0.prototype.isInfinity=function(){return this.z.cmpn(0)===0};B0.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),i=t.redSub(a),y=t.redMul(a),x=i.redMul(a.redAdd(this.curve.a24.redMul(i)));return this.curve.point(y,x)};B0.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};B0.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),i=e.x.redAdd(e.z),y=e.x.redSub(e.z),x=y.redMul(r),u=i.redMul(a),o=t.z.redMul(x.redAdd(u).redSqr()),c=t.x.redMul(x.redISub(u).redSqr());return this.curve.point(o,c)};B0.prototype.mul=function(e){for(var t=e.clone(),r=this,a=this.curve.point(null,null),i=this,y=[];t.cmpn(0)!==0;t.iushrn(1))y.push(t.andln(1));for(var x=y.length-1;x>=0;x--)y[x]===0?(r=r.diffAdd(a,i),a=a.dbl()):(a=r.diffAdd(a,i),r=r.dbl());return a};B0.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};B0.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};B0.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};B0.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};B0.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var gs=j0,lt=pt,mn=Er,Br=Ar,ms=gs.assert;function ht(f){this.twisted=(f.a|0)!==1,this.mOneA=this.twisted&&(f.a|0)===-1,this.extended=this.mOneA,Br.call(this,"edwards",f),this.a=new lt(f.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new lt(f.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new lt(f.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),ms(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(f.c|0)===1}mn(ht,Br);var _s=ht;ht.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};ht.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};ht.prototype.jpoint=function(e,t,r,a){return this.point(e,t,r,a)};ht.prototype.pointFromX=function(e,t){e=new lt(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),y=a.redMul(i.redInvm()),x=y.redSqrt();if(x.redSqr().redSub(y).cmp(this.zero)!==0)throw new Error("invalid point");var u=x.fromRed().isOdd();return(t&&!u||!t&&u)&&(x=x.redNeg()),this.point(e,x)};ht.prototype.pointFromY=function(e,t){e=new lt(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),a=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),y=a.redMul(i.redInvm());if(y.cmp(this.zero)===0){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var x=y.redSqrt();if(x.redSqr().redSub(y).cmp(this.zero)!==0)throw new Error("invalid point");return x.fromRed().isOdd()!==t&&(x=x.redNeg()),this.point(x,e)};ht.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),a=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return a.cmp(i)===0};function v0(f,e,t,r,a){Br.BasePoint.call(this,f,"projective"),e===null&&t===null&&r===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new lt(e,16),this.y=new lt(t,16),this.z=r?new lt(r,16):this.curve.one,this.t=a&&new lt(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}mn(v0,Br.BasePoint);ht.prototype.pointFromJSON=function(e){return v0.fromJSON(this,e)};ht.prototype.point=function(e,t,r,a){return new v0(this,e,t,r,a)};v0.fromJSON=function(e,t){return new v0(e,t[0],t[1],t[2])};v0.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};v0.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};v0.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var a=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),y=a.redAdd(t),x=y.redSub(r),u=a.redSub(t),o=i.redMul(x),c=y.redMul(u),v=i.redMul(u),b=x.redMul(y);return this.curve.point(o,c,b,v)};v0.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),r=this.y.redSqr(),a,i,y,x,u,o;if(this.curve.twisted){x=this.curve._mulA(t);var c=x.redAdd(r);this.zOne?(a=e.redSub(t).redSub(r).redMul(c.redSub(this.curve.two)),i=c.redMul(x.redSub(r)),y=c.redSqr().redSub(c).redSub(c)):(u=this.z.redSqr(),o=c.redSub(u).redISub(u),a=e.redSub(t).redISub(r).redMul(o),i=c.redMul(x.redSub(r)),y=c.redMul(o))}else x=t.redAdd(r),u=this.curve._mulC(this.z).redSqr(),o=x.redSub(u).redSub(u),a=this.curve._mulC(e.redISub(x)).redMul(o),i=this.curve._mulC(x).redMul(t.redISub(r)),y=x.redMul(o);return this.curve.point(a,i,y)};v0.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};v0.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),y=r.redSub(t),x=i.redSub(a),u=i.redAdd(a),o=r.redAdd(t),c=y.redMul(x),v=u.redMul(o),b=y.redMul(o),C=x.redMul(u);return this.curve.point(c,v,C,b)};v0.prototype._projAdd=function(e){var t=this.z.redMul(e.z),r=t.redSqr(),a=this.x.redMul(e.x),i=this.y.redMul(e.y),y=this.curve.d.redMul(a).redMul(i),x=r.redSub(y),u=r.redAdd(y),o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(i),c=t.redMul(x).redMul(o),v,b;return this.curve.twisted?(v=t.redMul(u).redMul(i.redSub(this.curve._mulA(a))),b=x.redMul(u)):(v=t.redMul(u).redMul(i.redSub(a)),b=this.curve._mulC(x).redMul(u)),this.curve.point(c,v,b)};v0.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};v0.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};v0.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)};v0.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)};v0.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};v0.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};v0.prototype.getX=function(){return this.normalize(),this.x.fromRed()};v0.prototype.getY=function(){return this.normalize(),this.y.fromRed()};v0.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};v0.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;for(var r=e.clone(),a=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),this.x.cmp(t)===0)return!0}};v0.prototype.toP=v0.prototype.normalize;v0.prototype.mixedAdd=v0.prototype.add;(function(f){var e=f;e.base=Ar,e.short=bs,e.mont=ys,e.edwards=_s})($f);var Cr={},Mr={},Le={},As=It,Es=Er;Le.inherits=Es;function ws(f,e){return(f.charCodeAt(e)&64512)!==55296||e<0||e+1>=f.length?!1:(f.charCodeAt(e+1)&64512)===56320}function Bs(f,e){if(Array.isArray(f))return f.slice();if(!f)return[];var t=[];if(typeof f=="string")if(e){if(e==="hex")for(f=f.replace(/[^a-z0-9]+/ig,""),f.length%2!==0&&(f="0"+f),a=0;a<f.length;a+=2)t.push(parseInt(f[a]+f[a+1],16))}else for(var r=0,a=0;a<f.length;a++){var i=f.charCodeAt(a);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):ws(f,a)?(i=65536+((i&1023)<<10)+(f.charCodeAt(++a)&1023),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128)}else for(a=0;a<f.length;a++)t[a]=f[a]|0;return t}Le.toArray=Bs;function Cs(f){for(var e="",t=0;t<f.length;t++)e+=An(f[t].toString(16));return e}Le.toHex=Cs;function _n(f){var e=f>>>24|f>>>8&65280|f<<8&16711680|(f&255)<<24;return e>>>0}Le.htonl=_n;function Ms(f,e){for(var t="",r=0;r<f.length;r++){var a=f[r];e==="little"&&(a=_n(a)),t+=En(a.toString(16))}return t}Le.toHex32=Ms;function An(f){return f.length===1?"0"+f:f}Le.zero2=An;function En(f){return f.length===7?"0"+f:f.length===6?"00"+f:f.length===5?"000"+f:f.length===4?"0000"+f:f.length===3?"00000"+f:f.length===2?"000000"+f:f.length===1?"0000000"+f:f}Le.zero8=En;function Ss(f,e,t,r){var a=t-e;As(a%4===0);for(var i=new Array(a/4),y=0,x=e;y<i.length;y++,x+=4){var u;r==="big"?u=f[x]<<24|f[x+1]<<16|f[x+2]<<8|f[x+3]:u=f[x+3]<<24|f[x+2]<<16|f[x+1]<<8|f[x],i[y]=u>>>0}return i}Le.join32=Ss;function Fs(f,e){for(var t=new Array(f.length*4),r=0,a=0;r<f.length;r++,a+=4){var i=f[r];e==="big"?(t[a]=i>>>24,t[a+1]=i>>>16&255,t[a+2]=i>>>8&255,t[a+3]=i&255):(t[a+3]=i>>>24,t[a+2]=i>>>16&255,t[a+1]=i>>>8&255,t[a]=i&255)}return t}Le.split32=Fs;function Ds(f,e){return f>>>e|f<<32-e}Le.rotr32=Ds;function Rs(f,e){return f<<e|f>>>32-e}Le.rotl32=Rs;function Ps(f,e){return f+e>>>0}Le.sum32=Ps;function ks(f,e,t){return f+e+t>>>0}Le.sum32_3=ks;function Is(f,e,t,r){return f+e+t+r>>>0}Le.sum32_4=Is;function Ts(f,e,t,r,a){return f+e+t+r+a>>>0}Le.sum32_5=Ts;function Os(f,e,t,r){var a=f[e],i=f[e+1],y=r+i>>>0,x=(y<r?1:0)+t+a;f[e]=x>>>0,f[e+1]=y}Le.sum64=Os;function zs(f,e,t,r){var a=e+r>>>0,i=(a<e?1:0)+f+t;return i>>>0}Le.sum64_hi=zs;function qs(f,e,t,r){var a=e+r;return a>>>0}Le.sum64_lo=qs;function Ns(f,e,t,r,a,i,y,x){var u=0,o=e;o=o+r>>>0,u+=o<e?1:0,o=o+i>>>0,u+=o<i?1:0,o=o+x>>>0,u+=o<x?1:0;var c=f+t+a+y+u;return c>>>0}Le.sum64_4_hi=Ns;function Ls(f,e,t,r,a,i,y,x){var u=e+r+i+x;return u>>>0}Le.sum64_4_lo=Ls;function Hs(f,e,t,r,a,i,y,x,u,o){var c=0,v=e;v=v+r>>>0,c+=v<e?1:0,v=v+i>>>0,c+=v<i?1:0,v=v+x>>>0,c+=v<x?1:0,v=v+o>>>0,c+=v<o?1:0;var b=f+t+a+y+u+c;return b>>>0}Le.sum64_5_hi=Hs;function Us(f,e,t,r,a,i,y,x,u,o){var c=e+r+i+x+o;return c>>>0}Le.sum64_5_lo=Us;function $s(f,e,t){var r=e<<32-t|f>>>t;return r>>>0}Le.rotr64_hi=$s;function Ws(f,e,t){var r=f<<32-t|e>>>t;return r>>>0}Le.rotr64_lo=Ws;function js(f,e,t){return f>>>t}Le.shr64_hi=js;function Ys(f,e,t){var r=f<<32-t|e>>>t;return r>>>0}Le.shr64_lo=Ys;var Wt={},Ni=Le,Ks=It;function Sr(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Wt.BlockHash=Sr;Sr.prototype.update=function(e,t){if(e=Ni.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),this.pending.length===0&&(this.pending=null),e=Ni.join32(e,0,e.length-r,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this};Sr.prototype.digest=function(e){return this.update(this._pad()),Ks(this.pending===null),this._digest(e)};Sr.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,a=new Array(r+this.padLength);a[0]=128;for(var i=1;i<r;i++)a[i]=0;if(e<<=3,this.endian==="big"){for(var y=8;y<this.padLength;y++)a[i++]=0;a[i++]=0,a[i++]=0,a[i++]=0,a[i++]=0,a[i++]=e>>>24&255,a[i++]=e>>>16&255,a[i++]=e>>>8&255,a[i++]=e&255}else for(a[i++]=e&255,a[i++]=e>>>8&255,a[i++]=e>>>16&255,a[i++]=e>>>24&255,a[i++]=0,a[i++]=0,a[i++]=0,a[i++]=0,y=8;y<this.padLength;y++)a[i++]=0;return a};var jt={},ut={},Vs=Le,ft=Vs.rotr32;function Xs(f,e,t,r){if(f===0)return wn(e,t,r);if(f===1||f===3)return Cn(e,t,r);if(f===2)return Bn(e,t,r)}ut.ft_1=Xs;function wn(f,e,t){return f&e^~f&t}ut.ch32=wn;function Bn(f,e,t){return f&e^f&t^e&t}ut.maj32=Bn;function Cn(f,e,t){return f^e^t}ut.p32=Cn;function Zs(f){return ft(f,2)^ft(f,13)^ft(f,22)}ut.s0_256=Zs;function Gs(f){return ft(f,6)^ft(f,11)^ft(f,25)}ut.s1_256=Gs;function Qs(f){return ft(f,7)^ft(f,18)^f>>>3}ut.g0_256=Qs;function Js(f){return ft(f,17)^ft(f,19)^f>>>10}ut.g1_256=Js;var qt=Le,eo=Wt,to=ut,pf=qt.rotl32,Gt=qt.sum32,ro=qt.sum32_5,fo=to.ft_1,Mn=eo.BlockHash,io=[1518500249,1859775393,2400959708,3395469782];function st(){if(!(this instanceof st))return new st;Mn.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}qt.inherits(st,Mn);var no=st;st.blockSize=512;st.outSize=160;st.hmacStrength=80;st.padLength=64;st.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=pf(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var i=this.h[0],y=this.h[1],x=this.h[2],u=this.h[3],o=this.h[4];for(a=0;a<r.length;a++){var c=~~(a/20),v=ro(pf(i,5),fo(c,y,x,u),o,r[a],io[c]);o=u,u=x,x=pf(y,30),y=i,i=v}this.h[0]=Gt(this.h[0],i),this.h[1]=Gt(this.h[1],y),this.h[2]=Gt(this.h[2],x),this.h[3]=Gt(this.h[3],u),this.h[4]=Gt(this.h[4],o)};st.prototype._digest=function(e){return e==="hex"?qt.toHex32(this.h,"big"):qt.split32(this.h,"big")};var Nt=Le,ao=Wt,Yt=ut,so=It,J0=Nt.sum32,oo=Nt.sum32_4,co=Nt.sum32_5,ho=Yt.ch32,uo=Yt.maj32,lo=Yt.s0_256,xo=Yt.s1_256,vo=Yt.g0_256,bo=Yt.g1_256,Sn=ao.BlockHash,po=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ot(){if(!(this instanceof ot))return new ot;Sn.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=po,this.W=new Array(64)}Nt.inherits(ot,Sn);var Fn=ot;ot.blockSize=512;ot.outSize=256;ot.hmacStrength=192;ot.padLength=64;ot.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=oo(bo(r[a-2]),r[a-7],vo(r[a-15]),r[a-16]);var i=this.h[0],y=this.h[1],x=this.h[2],u=this.h[3],o=this.h[4],c=this.h[5],v=this.h[6],b=this.h[7];for(so(this.k.length===r.length),a=0;a<r.length;a++){var C=co(b,xo(o),ho(o,c,v),this.k[a],r[a]),w=J0(lo(i),uo(i,y,x));b=v,v=c,c=o,o=J0(u,C),u=x,x=y,y=i,i=J0(C,w)}this.h[0]=J0(this.h[0],i),this.h[1]=J0(this.h[1],y),this.h[2]=J0(this.h[2],x),this.h[3]=J0(this.h[3],u),this.h[4]=J0(this.h[4],o),this.h[5]=J0(this.h[5],c),this.h[6]=J0(this.h[6],v),this.h[7]=J0(this.h[7],b)};ot.prototype._digest=function(e){return e==="hex"?Nt.toHex32(this.h,"big"):Nt.split32(this.h,"big")};var Sf=Le,Dn=Fn;function vt(){if(!(this instanceof vt))return new vt;Dn.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Sf.inherits(vt,Dn);var yo=vt;vt.blockSize=512;vt.outSize=224;vt.hmacStrength=192;vt.padLength=64;vt.prototype._digest=function(e){return e==="hex"?Sf.toHex32(this.h.slice(0,7),"big"):Sf.split32(this.h.slice(0,7),"big")};var H0=Le,go=Wt,mo=It,it=H0.rotr64_hi,nt=H0.rotr64_lo,Rn=H0.shr64_hi,Pn=H0.shr64_lo,gt=H0.sum64,yf=H0.sum64_hi,gf=H0.sum64_lo,_o=H0.sum64_4_hi,Ao=H0.sum64_4_lo,Eo=H0.sum64_5_hi,wo=H0.sum64_5_lo,kn=go.BlockHash,Bo=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function tt(){if(!(this instanceof tt))return new tt;kn.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Bo,this.W=new Array(160)}H0.inherits(tt,kn);var In=tt;tt.blockSize=1024;tt.outSize=512;tt.hmacStrength=192;tt.padLength=128;tt.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;a<32;a++)r[a]=e[t+a];for(;a<r.length;a+=2){var i=Oo(r[a-4],r[a-3]),y=zo(r[a-4],r[a-3]),x=r[a-14],u=r[a-13],o=Io(r[a-30],r[a-29]),c=To(r[a-30],r[a-29]),v=r[a-32],b=r[a-31];r[a]=_o(i,y,x,u,o,c,v,b),r[a+1]=Ao(i,y,x,u,o,c,v,b)}};tt.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,a=this.h[0],i=this.h[1],y=this.h[2],x=this.h[3],u=this.h[4],o=this.h[5],c=this.h[6],v=this.h[7],b=this.h[8],C=this.h[9],w=this.h[10],R=this.h[11],P=this.h[12],q=this.h[13],F=this.h[14],k=this.h[15];mo(this.k.length===r.length);for(var T=0;T<r.length;T+=2){var H=F,$=k,Y=Po(b,C),X=ko(b,C),Q=Co(b,C,w,R,P),U=Mo(b,C,w,R,P,q),A=this.k[T],n=this.k[T+1],d=r[T],g=r[T+1],B=Eo(H,$,Y,X,Q,U,A,n,d,g),S=wo(H,$,Y,X,Q,U,A,n,d,g);H=Do(a,i),$=Ro(a,i),Y=So(a,i,y,x,u),X=Fo(a,i,y,x,u,o);var z=yf(H,$,Y,X),N=gf(H,$,Y,X);F=P,k=q,P=w,q=R,w=b,R=C,b=yf(c,v,B,S),C=gf(v,v,B,S),c=u,v=o,u=y,o=x,y=a,x=i,a=yf(B,S,z,N),i=gf(B,S,z,N)}gt(this.h,0,a,i),gt(this.h,2,y,x),gt(this.h,4,u,o),gt(this.h,6,c,v),gt(this.h,8,b,C),gt(this.h,10,w,R),gt(this.h,12,P,q),gt(this.h,14,F,k)};tt.prototype._digest=function(e){return e==="hex"?H0.toHex32(this.h,"big"):H0.split32(this.h,"big")};function Co(f,e,t,r,a){var i=f&t^~f&a;return i<0&&(i+=4294967296),i}function Mo(f,e,t,r,a,i){var y=e&r^~e&i;return y<0&&(y+=4294967296),y}function So(f,e,t,r,a){var i=f&t^f&a^t&a;return i<0&&(i+=4294967296),i}function Fo(f,e,t,r,a,i){var y=e&r^e&i^r&i;return y<0&&(y+=4294967296),y}function Do(f,e){var t=it(f,e,28),r=it(e,f,2),a=it(e,f,7),i=t^r^a;return i<0&&(i+=4294967296),i}function Ro(f,e){var t=nt(f,e,28),r=nt(e,f,2),a=nt(e,f,7),i=t^r^a;return i<0&&(i+=4294967296),i}function Po(f,e){var t=it(f,e,14),r=it(f,e,18),a=it(e,f,9),i=t^r^a;return i<0&&(i+=4294967296),i}function ko(f,e){var t=nt(f,e,14),r=nt(f,e,18),a=nt(e,f,9),i=t^r^a;return i<0&&(i+=4294967296),i}function Io(f,e){var t=it(f,e,1),r=it(f,e,8),a=Rn(f,e,7),i=t^r^a;return i<0&&(i+=4294967296),i}function To(f,e){var t=nt(f,e,1),r=nt(f,e,8),a=Pn(f,e,7),i=t^r^a;return i<0&&(i+=4294967296),i}function Oo(f,e){var t=it(f,e,19),r=it(e,f,29),a=Rn(f,e,6),i=t^r^a;return i<0&&(i+=4294967296),i}function zo(f,e){var t=nt(f,e,19),r=nt(e,f,29),a=Pn(f,e,6),i=t^r^a;return i<0&&(i+=4294967296),i}var Ff=Le,Tn=In;function bt(){if(!(this instanceof bt))return new bt;Tn.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ff.inherits(bt,Tn);var qo=bt;bt.blockSize=1024;bt.outSize=384;bt.hmacStrength=192;bt.padLength=128;bt.prototype._digest=function(e){return e==="hex"?Ff.toHex32(this.h.slice(0,12),"big"):Ff.split32(this.h.slice(0,12),"big")};jt.sha1=no;jt.sha224=yo;jt.sha256=Fn;jt.sha384=qo;jt.sha512=In;var On={},Rt=Le,No=Wt,ar=Rt.rotl32,Li=Rt.sum32,Qt=Rt.sum32_3,Hi=Rt.sum32_4,zn=No.BlockHash;function ct(){if(!(this instanceof ct))return new ct;zn.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Rt.inherits(ct,zn);On.ripemd160=ct;ct.blockSize=512;ct.outSize=160;ct.hmacStrength=192;ct.padLength=64;ct.prototype._update=function(e,t){for(var r=this.h[0],a=this.h[1],i=this.h[2],y=this.h[3],x=this.h[4],u=r,o=a,c=i,v=y,b=x,C=0;C<80;C++){var w=Li(ar(Hi(r,Ui(C,a,i,y),e[Uo[C]+t],Lo(C)),Wo[C]),x);r=x,x=y,y=ar(i,10),i=a,a=w,w=Li(ar(Hi(u,Ui(79-C,o,c,v),e[$o[C]+t],Ho(C)),jo[C]),b),u=b,b=v,v=ar(c,10),c=o,o=w}w=Qt(this.h[1],i,v),this.h[1]=Qt(this.h[2],y,b),this.h[2]=Qt(this.h[3],x,u),this.h[3]=Qt(this.h[4],r,o),this.h[4]=Qt(this.h[0],a,c),this.h[0]=w};ct.prototype._digest=function(e){return e==="hex"?Rt.toHex32(this.h,"little"):Rt.split32(this.h,"little")};function Ui(f,e,t,r){return f<=15?e^t^r:f<=31?e&t|~e&r:f<=47?(e|~t)^r:f<=63?e&r|t&~r:e^(t|~r)}function Lo(f){return f<=15?0:f<=31?1518500249:f<=47?1859775393:f<=63?2400959708:2840853838}function Ho(f){return f<=15?1352829926:f<=31?1548603684:f<=47?1836072691:f<=63?2053994217:0}var Uo=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],$o=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Wo=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],jo=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Yo=Le,Ko=It;function Lt(f,e,t){if(!(this instanceof Lt))return new Lt(f,e,t);this.Hash=f,this.blockSize=f.blockSize/8,this.outSize=f.outSize/8,this.inner=null,this.outer=null,this._init(Yo.toArray(e,t))}var Vo=Lt;Lt.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Ko(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)};Lt.prototype.update=function(e,t){return this.inner.update(e,t),this};Lt.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(f){var e=f;e.utils=Le,e.common=Wt,e.sha=jt,e.ripemd=On,e.hmac=Vo,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(Mr);var mf,$i;function Xo(){return $i||($i=1,mf={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),mf}(function(f){var e=f,t=Mr,r=$f,a=j0,i=a.assert;function y(o){o.type==="short"?this.curve=new r.short(o):o.type==="edwards"?this.curve=new r.edwards(o):this.curve=new r.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=y;function x(o,c){Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:function(){var v=new y(c);return Object.defineProperty(e,o,{configurable:!0,enumerable:!0,value:v}),v}})}x("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),x("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),x("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),x("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),x("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),x("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),x("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=Xo()}catch{u=void 0}x("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})})(Cr);var Zo=Mr,St=Hf,qn=It;function _t(f){if(!(this instanceof _t))return new _t(f);this.hash=f.hash,this.predResist=!!f.predResist,this.outLen=this.hash.outSize,this.minEntropy=f.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=St.toArray(f.entropy,f.entropyEnc||"hex"),t=St.toArray(f.nonce,f.nonceEnc||"hex"),r=St.toArray(f.pers,f.persEnc||"hex");qn(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var Go=_t;_t.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(a),this._reseed=1,this.reseedInterval=281474976710656};_t.prototype._hmac=function(){return new Zo.hmac(this.hash,this.K)};_t.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};_t.prototype.reseed=function(e,t,r,a){typeof t!="string"&&(a=r,r=t,t=null),e=St.toArray(e,t),r=St.toArray(r,a),qn(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1};_t.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(a=r,r=t,t=null),r&&(r=St.toArray(r,a||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var y=i.slice(0,e);return this._update(r),this._reseed++,St.encode(y,t)};var Qo=pt,Jo=j0,Df=Jo.assert;function T0(f,e){this.ec=f,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var ec=T0;T0.fromPublic=function(e,t,r){return t instanceof T0?t:new T0(e,{pub:t,pubEnc:r})};T0.fromPrivate=function(e,t,r){return t instanceof T0?t:new T0(e,{priv:t,privEnc:r})};T0.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};T0.prototype.getPublic=function(e,t){return typeof e=="string"&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub};T0.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};T0.prototype._importPrivate=function(e,t){this.priv=new Qo(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)};T0.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==="mont"?Df(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Df(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};T0.prototype.derive=function(e){return e.validate()||Df(e.validate(),"public point not validated"),e.mul(this.priv).getX()};T0.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)};T0.prototype.verify=function(e,t){return this.ec.verify(e,t,this)};T0.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var gr=pt,jf=j0,tc=jf.assert;function Fr(f,e){if(f instanceof Fr)return f;this._importDER(f,e)||(tc(f.r&&f.s,"Signature without r or s"),this.r=new gr(f.r,16),this.s=new gr(f.s,16),f.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=f.recoveryParam)}var rc=Fr;function fc(){this.place=0}function _f(f,e){var t=f[e.place++];if(!(t&128))return t;var r=t&15;if(r===0||r>4)return!1;for(var a=0,i=0,y=e.place;i<r;i++,y++)a<<=8,a|=f[y],a>>>=0;return a<=127?!1:(e.place=y,a)}function Wi(f){for(var e=0,t=f.length-1;!f[e]&&!(f[e+1]&128)&&e<t;)e++;return e===0?f:f.slice(e)}Fr.prototype._importDER=function(e,t){e=jf.toArray(e,t);var r=new fc;if(e[r.place++]!==48)return!1;var a=_f(e,r);if(a===!1||a+r.place!==e.length||e[r.place++]!==2)return!1;var i=_f(e,r);if(i===!1)return!1;var y=e.slice(r.place,i+r.place);if(r.place+=i,e[r.place++]!==2)return!1;var x=_f(e,r);if(x===!1||e.length!==x+r.place)return!1;var u=e.slice(r.place,x+r.place);if(y[0]===0)if(y[1]&128)y=y.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new gr(y),this.s=new gr(u),this.recoveryParam=null,!0};function Af(f,e){if(e<128){f.push(e);return}var t=1+(Math.log(e)/Math.LN2>>>3);for(f.push(t|128);--t;)f.push(e>>>(t<<3)&255);f.push(e)}Fr.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),r[0]&128&&(r=[0].concat(r)),t=Wi(t),r=Wi(r);!r[0]&&!(r[1]&128);)r=r.slice(1);var a=[2];Af(a,t.length),a=a.concat(t),a.push(2),Af(a,r.length);var i=a.concat(r),y=[48];return Af(y,i.length),y=y.concat(i),jf.encode(y,e)};var Ft=pt,Nn=Go,ic=j0,Ef=Cr,nc=yn,Ln=ic.assert,Yf=ec,Dr=rc;function V0(f){if(!(this instanceof V0))return new V0(f);typeof f=="string"&&(Ln(Object.prototype.hasOwnProperty.call(Ef,f),"Unknown curve "+f),f=Ef[f]),f instanceof Ef.PresetCurve&&(f={curve:f}),this.curve=f.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=f.curve.g,this.g.precompute(f.curve.n.bitLength()+1),this.hash=f.hash||f.curve.hash}var ac=V0;V0.prototype.keyPair=function(e){return new Yf(this,e)};V0.prototype.keyFromPrivate=function(e,t){return Yf.fromPrivate(this,e,t)};V0.prototype.keyFromPublic=function(e,t){return Yf.fromPublic(this,e,t)};V0.prototype.genKeyPair=function(e){e||(e={});for(var t=new Nn({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||nc(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new Ft(2));;){var i=new Ft(t.generate(r));if(!(i.cmp(a)>0))return i.iaddn(1),this.keyFromPrivate(i)}};V0.prototype._truncateToN=function(e,t){var r=e.byteLength()*8-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};V0.prototype.sign=function(e,t,r,a){typeof r=="object"&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new Ft(e,16));for(var i=this.n.byteLength(),y=t.getPrivate().toArray("be",i),x=e.toArray("be",i),u=new Nn({hash:this.hash,entropy:y,nonce:x,pers:a.pers,persEnc:a.persEnc||"utf8"}),o=this.n.sub(new Ft(1)),c=0;;c++){var v=a.k?a.k(c):new Ft(u.generate(this.n.byteLength()));if(v=this._truncateToN(v,!0),!(v.cmpn(1)<=0||v.cmp(o)>=0)){var b=this.g.mul(v);if(!b.isInfinity()){var C=b.getX(),w=C.umod(this.n);if(w.cmpn(0)!==0){var R=v.invm(this.n).mul(w.mul(t.getPrivate()).iadd(e));if(R=R.umod(this.n),R.cmpn(0)!==0){var P=(b.getY().isOdd()?1:0)|(C.cmp(w)!==0?2:0);return a.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),P^=1),new Dr({r:w,s:R,recoveryParam:P})}}}}}};V0.prototype.verify=function(e,t,r,a){e=this._truncateToN(new Ft(e,16)),r=this.keyFromPublic(r,a),t=new Dr(t,"hex");var i=t.r,y=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||y.cmpn(1)<0||y.cmp(this.n)>=0)return!1;var x=y.invm(this.n),u=x.mul(e).umod(this.n),o=x.mul(i).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(u,r.getPublic(),o),c.isInfinity()?!1:c.eqXToP(i)):(c=this.g.mulAdd(u,r.getPublic(),o),c.isInfinity()?!1:c.getX().umod(this.n).cmp(i)===0)};V0.prototype.recoverPubKey=function(f,e,t,r){Ln((3&t)===t,"The recovery param is more than two bits"),e=new Dr(e,r);var a=this.n,i=new Ft(f),y=e.r,x=e.s,u=t&1,o=t>>1;if(y.cmp(this.curve.p.umod(this.curve.n))>=0&&o)throw new Error("Unable to find sencond key candinate");o?y=this.curve.pointFromX(y.add(this.curve.n),u):y=this.curve.pointFromX(y,u);var c=e.r.invm(a),v=a.sub(i).mul(c).umod(a),b=x.mul(c).umod(a);return this.g.mulAdd(v,y,b)};V0.prototype.getKeyRecoveryParam=function(f,e,t,r){if(e=new Dr(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(f,e,a)}catch{continue}if(i.eq(t))return a}throw new Error("Unable to find valid recovery factor")};var nr=j0,Hn=nr.assert,ji=nr.parseBytes,Kt=nr.cachedProperty;function w0(f,e){this.eddsa=f,this._secret=ji(e.secret),f.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=ji(e.pub)}w0.fromPublic=function(e,t){return t instanceof w0?t:new w0(e,{pub:t})};w0.fromSecret=function(e,t){return t instanceof w0?t:new w0(e,{secret:t})};w0.prototype.secret=function(){return this._secret};Kt(w0,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Kt(w0,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Kt(w0,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[r]&=127,a[r]|=64,a});Kt(w0,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Kt(w0,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Kt(w0,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});w0.prototype.sign=function(e){return Hn(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};w0.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)};w0.prototype.getSecret=function(e){return Hn(this._secret,"KeyPair is public only"),nr.encode(this.secret(),e)};w0.prototype.getPublic=function(e){return nr.encode(this.pubBytes(),e)};var sc=w0,oc=pt,Rr=j0,cc=Rr.assert,Pr=Rr.cachedProperty,dc=Rr.parseBytes;function Tt(f,e){this.eddsa=f,typeof e!="object"&&(e=dc(e)),Array.isArray(e)&&(e={R:e.slice(0,f.encodingLength),S:e.slice(f.encodingLength)}),cc(e.R&&e.S,"Signature without R or S"),f.isPoint(e.R)&&(this._R=e.R),e.S instanceof oc&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Pr(Tt,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Pr(Tt,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Pr(Tt,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Pr(Tt,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Tt.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Tt.prototype.toHex=function(){return Rr.encode(this.toBytes(),"hex").toUpperCase()};var hc=Tt,uc=Mr,lc=Cr,Ht=j0,xc=Ht.assert,Un=Ht.parseBytes,$n=sc,Yi=hc;function U0(f){if(xc(f==="ed25519","only tested with ed25519 so far"),!(this instanceof U0))return new U0(f);f=lc[f].curve,this.curve=f,this.g=f.g,this.g.precompute(f.n.bitLength()+1),this.pointClass=f.point().constructor,this.encodingLength=Math.ceil(f.n.bitLength()/8),this.hash=uc.sha512}var vc=U0;U0.prototype.sign=function(e,t){e=Un(e);var r=this.keyFromSecret(t),a=this.hashInt(r.messagePrefix(),e),i=this.g.mul(a),y=this.encodePoint(i),x=this.hashInt(y,r.pubBytes(),e).mul(r.priv()),u=a.add(x).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:y})};U0.prototype.verify=function(e,t,r){e=Un(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),a.pubBytes(),e),y=this.g.mul(t.S()),x=t.R().add(a.pub().mul(i));return x.eq(y)};U0.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return Ht.intFromLE(e.digest()).umod(this.curve.n)};U0.prototype.keyFromPublic=function(e){return $n.fromPublic(this,e)};U0.prototype.keyFromSecret=function(e){return $n.fromSecret(this,e)};U0.prototype.makeSignature=function(e){return e instanceof Yi?e:new Yi(this,e)};U0.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t};U0.prototype.decodePoint=function(e){e=Ht.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(e[t]&-129),a=(e[t]&128)!==0,i=Ht.intFromLE(r);return this.curve.pointFromY(i,a)};U0.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};U0.prototype.decodeInt=function(e){return Ht.intFromLE(e)};U0.prototype.isPoint=function(e){return e instanceof this.pointClass};(function(f){var e=f;e.version=us.version,e.utils=j0,e.rand=yn,e.curve=$f,e.curves=Cr,e.ec=ac,e.eddsa=vc})(bn);var Wn={exports:{}};(function(f){(function(e){var t=function(l){var _,m=new Float64Array(16);if(l)for(_=0;_<l.length;_++)m[_]=l[_];return m},r=function(){throw new Error("no PRNG")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var y=t(),x=t([1]),u=t([56129,1]),o=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),b=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),C=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(l,_,m,s){l[_]=m>>24&255,l[_+1]=m>>16&255,l[_+2]=m>>8&255,l[_+3]=m&255,l[_+4]=s>>24&255,l[_+5]=s>>16&255,l[_+6]=s>>8&255,l[_+7]=s&255}function R(l,_,m,s,M){var p,I=0;for(p=0;p<M;p++)I|=l[_+p]^m[s+p];return(1&I-1>>>8)-1}function P(l,_,m,s){return R(l,_,m,s,16)}function q(l,_,m,s){return R(l,_,m,s,32)}function F(l,_,m,s){for(var M=s[0]&255|(s[1]&255)<<8|(s[2]&255)<<16|(s[3]&255)<<24,p=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,I=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,L=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,V=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,ne=s[4]&255|(s[5]&255)<<8|(s[6]&255)<<16|(s[7]&255)<<24,fe=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,he=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,te=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,xe=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,ue=s[8]&255|(s[9]&255)<<8|(s[10]&255)<<16|(s[11]&255)<<24,ve=m[16]&255|(m[17]&255)<<8|(m[18]&255)<<16|(m[19]&255)<<24,ge=m[20]&255|(m[21]&255)<<8|(m[22]&255)<<16|(m[23]&255)<<24,me=m[24]&255|(m[25]&255)<<8|(m[26]&255)<<16|(m[27]&255)<<24,_e=m[28]&255|(m[29]&255)<<8|(m[30]&255)<<16|(m[31]&255)<<24,pe=s[12]&255|(s[13]&255)<<8|(s[14]&255)<<16|(s[15]&255)<<24,de=M,ye=p,oe=I,le=L,be=V,se=ne,Z=fe,G=he,ie=te,J=xe,ee=ue,ae=ve,Ee=ge,Be=me,De=_e,Ce=pe,O,Te=0;Te<20;Te+=2)O=de+Ee|0,be^=O<<7|O>>>25,O=be+de|0,ie^=O<<9|O>>>23,O=ie+be|0,Ee^=O<<13|O>>>19,O=Ee+ie|0,de^=O<<18|O>>>14,O=se+ye|0,J^=O<<7|O>>>25,O=J+se|0,Be^=O<<9|O>>>23,O=Be+J|0,ye^=O<<13|O>>>19,O=ye+Be|0,se^=O<<18|O>>>14,O=ee+Z|0,De^=O<<7|O>>>25,O=De+ee|0,oe^=O<<9|O>>>23,O=oe+De|0,Z^=O<<13|O>>>19,O=Z+oe|0,ee^=O<<18|O>>>14,O=Ce+ae|0,le^=O<<7|O>>>25,O=le+Ce|0,G^=O<<9|O>>>23,O=G+le|0,ae^=O<<13|O>>>19,O=ae+G|0,Ce^=O<<18|O>>>14,O=de+le|0,ye^=O<<7|O>>>25,O=ye+de|0,oe^=O<<9|O>>>23,O=oe+ye|0,le^=O<<13|O>>>19,O=le+oe|0,de^=O<<18|O>>>14,O=se+be|0,Z^=O<<7|O>>>25,O=Z+se|0,G^=O<<9|O>>>23,O=G+Z|0,be^=O<<13|O>>>19,O=be+G|0,se^=O<<18|O>>>14,O=ee+J|0,ae^=O<<7|O>>>25,O=ae+ee|0,ie^=O<<9|O>>>23,O=ie+ae|0,J^=O<<13|O>>>19,O=J+ie|0,ee^=O<<18|O>>>14,O=Ce+De|0,Ee^=O<<7|O>>>25,O=Ee+Ce|0,Be^=O<<9|O>>>23,O=Be+Ee|0,De^=O<<13|O>>>19,O=De+Be|0,Ce^=O<<18|O>>>14;de=de+M|0,ye=ye+p|0,oe=oe+I|0,le=le+L|0,be=be+V|0,se=se+ne|0,Z=Z+fe|0,G=G+he|0,ie=ie+te|0,J=J+xe|0,ee=ee+ue|0,ae=ae+ve|0,Ee=Ee+ge|0,Be=Be+me|0,De=De+_e|0,Ce=Ce+pe|0,l[0]=de>>>0&255,l[1]=de>>>8&255,l[2]=de>>>16&255,l[3]=de>>>24&255,l[4]=ye>>>0&255,l[5]=ye>>>8&255,l[6]=ye>>>16&255,l[7]=ye>>>24&255,l[8]=oe>>>0&255,l[9]=oe>>>8&255,l[10]=oe>>>16&255,l[11]=oe>>>24&255,l[12]=le>>>0&255,l[13]=le>>>8&255,l[14]=le>>>16&255,l[15]=le>>>24&255,l[16]=be>>>0&255,l[17]=be>>>8&255,l[18]=be>>>16&255,l[19]=be>>>24&255,l[20]=se>>>0&255,l[21]=se>>>8&255,l[22]=se>>>16&255,l[23]=se>>>24&255,l[24]=Z>>>0&255,l[25]=Z>>>8&255,l[26]=Z>>>16&255,l[27]=Z>>>24&255,l[28]=G>>>0&255,l[29]=G>>>8&255,l[30]=G>>>16&255,l[31]=G>>>24&255,l[32]=ie>>>0&255,l[33]=ie>>>8&255,l[34]=ie>>>16&255,l[35]=ie>>>24&255,l[36]=J>>>0&255,l[37]=J>>>8&255,l[38]=J>>>16&255,l[39]=J>>>24&255,l[40]=ee>>>0&255,l[41]=ee>>>8&255,l[42]=ee>>>16&255,l[43]=ee>>>24&255,l[44]=ae>>>0&255,l[45]=ae>>>8&255,l[46]=ae>>>16&255,l[47]=ae>>>24&255,l[48]=Ee>>>0&255,l[49]=Ee>>>8&255,l[50]=Ee>>>16&255,l[51]=Ee>>>24&255,l[52]=Be>>>0&255,l[53]=Be>>>8&255,l[54]=Be>>>16&255,l[55]=Be>>>24&255,l[56]=De>>>0&255,l[57]=De>>>8&255,l[58]=De>>>16&255,l[59]=De>>>24&255,l[60]=Ce>>>0&255,l[61]=Ce>>>8&255,l[62]=Ce>>>16&255,l[63]=Ce>>>24&255}function k(l,_,m,s){for(var M=s[0]&255|(s[1]&255)<<8|(s[2]&255)<<16|(s[3]&255)<<24,p=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,I=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,L=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,V=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,ne=s[4]&255|(s[5]&255)<<8|(s[6]&255)<<16|(s[7]&255)<<24,fe=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,he=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,te=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,xe=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,ue=s[8]&255|(s[9]&255)<<8|(s[10]&255)<<16|(s[11]&255)<<24,ve=m[16]&255|(m[17]&255)<<8|(m[18]&255)<<16|(m[19]&255)<<24,ge=m[20]&255|(m[21]&255)<<8|(m[22]&255)<<16|(m[23]&255)<<24,me=m[24]&255|(m[25]&255)<<8|(m[26]&255)<<16|(m[27]&255)<<24,_e=m[28]&255|(m[29]&255)<<8|(m[30]&255)<<16|(m[31]&255)<<24,pe=s[12]&255|(s[13]&255)<<8|(s[14]&255)<<16|(s[15]&255)<<24,de=M,ye=p,oe=I,le=L,be=V,se=ne,Z=fe,G=he,ie=te,J=xe,ee=ue,ae=ve,Ee=ge,Be=me,De=_e,Ce=pe,O,Te=0;Te<20;Te+=2)O=de+Ee|0,be^=O<<7|O>>>25,O=be+de|0,ie^=O<<9|O>>>23,O=ie+be|0,Ee^=O<<13|O>>>19,O=Ee+ie|0,de^=O<<18|O>>>14,O=se+ye|0,J^=O<<7|O>>>25,O=J+se|0,Be^=O<<9|O>>>23,O=Be+J|0,ye^=O<<13|O>>>19,O=ye+Be|0,se^=O<<18|O>>>14,O=ee+Z|0,De^=O<<7|O>>>25,O=De+ee|0,oe^=O<<9|O>>>23,O=oe+De|0,Z^=O<<13|O>>>19,O=Z+oe|0,ee^=O<<18|O>>>14,O=Ce+ae|0,le^=O<<7|O>>>25,O=le+Ce|0,G^=O<<9|O>>>23,O=G+le|0,ae^=O<<13|O>>>19,O=ae+G|0,Ce^=O<<18|O>>>14,O=de+le|0,ye^=O<<7|O>>>25,O=ye+de|0,oe^=O<<9|O>>>23,O=oe+ye|0,le^=O<<13|O>>>19,O=le+oe|0,de^=O<<18|O>>>14,O=se+be|0,Z^=O<<7|O>>>25,O=Z+se|0,G^=O<<9|O>>>23,O=G+Z|0,be^=O<<13|O>>>19,O=be+G|0,se^=O<<18|O>>>14,O=ee+J|0,ae^=O<<7|O>>>25,O=ae+ee|0,ie^=O<<9|O>>>23,O=ie+ae|0,J^=O<<13|O>>>19,O=J+ie|0,ee^=O<<18|O>>>14,O=Ce+De|0,Ee^=O<<7|O>>>25,O=Ee+Ce|0,Be^=O<<9|O>>>23,O=Be+Ee|0,De^=O<<13|O>>>19,O=De+Be|0,Ce^=O<<18|O>>>14;l[0]=de>>>0&255,l[1]=de>>>8&255,l[2]=de>>>16&255,l[3]=de>>>24&255,l[4]=se>>>0&255,l[5]=se>>>8&255,l[6]=se>>>16&255,l[7]=se>>>24&255,l[8]=ee>>>0&255,l[9]=ee>>>8&255,l[10]=ee>>>16&255,l[11]=ee>>>24&255,l[12]=Ce>>>0&255,l[13]=Ce>>>8&255,l[14]=Ce>>>16&255,l[15]=Ce>>>24&255,l[16]=Z>>>0&255,l[17]=Z>>>8&255,l[18]=Z>>>16&255,l[19]=Z>>>24&255,l[20]=G>>>0&255,l[21]=G>>>8&255,l[22]=G>>>16&255,l[23]=G>>>24&255,l[24]=ie>>>0&255,l[25]=ie>>>8&255,l[26]=ie>>>16&255,l[27]=ie>>>24&255,l[28]=J>>>0&255,l[29]=J>>>8&255,l[30]=J>>>16&255,l[31]=J>>>24&255}function T(l,_,m,s){F(l,_,m,s)}function H(l,_,m,s){k(l,_,m,s)}var $=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Y(l,_,m,s,M,p,I){var L=new Uint8Array(16),V=new Uint8Array(64),ne,fe;for(fe=0;fe<16;fe++)L[fe]=0;for(fe=0;fe<8;fe++)L[fe]=p[fe];for(;M>=64;){for(T(V,L,I,$),fe=0;fe<64;fe++)l[_+fe]=m[s+fe]^V[fe];for(ne=1,fe=8;fe<16;fe++)ne=ne+(L[fe]&255)|0,L[fe]=ne&255,ne>>>=8;M-=64,_+=64,s+=64}if(M>0)for(T(V,L,I,$),fe=0;fe<M;fe++)l[_+fe]=m[s+fe]^V[fe];return 0}function X(l,_,m,s,M){var p=new Uint8Array(16),I=new Uint8Array(64),L,V;for(V=0;V<16;V++)p[V]=0;for(V=0;V<8;V++)p[V]=s[V];for(;m>=64;){for(T(I,p,M,$),V=0;V<64;V++)l[_+V]=I[V];for(L=1,V=8;V<16;V++)L=L+(p[V]&255)|0,p[V]=L&255,L>>>=8;m-=64,_+=64}if(m>0)for(T(I,p,M,$),V=0;V<m;V++)l[_+V]=I[V];return 0}function Q(l,_,m,s,M){var p=new Uint8Array(32);H(p,s,M,$);for(var I=new Uint8Array(8),L=0;L<8;L++)I[L]=s[L+16];return X(l,_,m,I,p)}function U(l,_,m,s,M,p,I){var L=new Uint8Array(32);H(L,p,I,$);for(var V=new Uint8Array(8),ne=0;ne<8;ne++)V[ne]=p[ne+16];return Y(l,_,m,s,M,V,L)}var A=function(l){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var _,m,s,M,p,I,L,V;_=l[0]&255|(l[1]&255)<<8,this.r[0]=_&8191,m=l[2]&255|(l[3]&255)<<8,this.r[1]=(_>>>13|m<<3)&8191,s=l[4]&255|(l[5]&255)<<8,this.r[2]=(m>>>10|s<<6)&7939,M=l[6]&255|(l[7]&255)<<8,this.r[3]=(s>>>7|M<<9)&8191,p=l[8]&255|(l[9]&255)<<8,this.r[4]=(M>>>4|p<<12)&255,this.r[5]=p>>>1&8190,I=l[10]&255|(l[11]&255)<<8,this.r[6]=(p>>>14|I<<2)&8191,L=l[12]&255|(l[13]&255)<<8,this.r[7]=(I>>>11|L<<5)&8065,V=l[14]&255|(l[15]&255)<<8,this.r[8]=(L>>>8|V<<8)&8191,this.r[9]=V>>>5&127,this.pad[0]=l[16]&255|(l[17]&255)<<8,this.pad[1]=l[18]&255|(l[19]&255)<<8,this.pad[2]=l[20]&255|(l[21]&255)<<8,this.pad[3]=l[22]&255|(l[23]&255)<<8,this.pad[4]=l[24]&255|(l[25]&255)<<8,this.pad[5]=l[26]&255|(l[27]&255)<<8,this.pad[6]=l[28]&255|(l[29]&255)<<8,this.pad[7]=l[30]&255|(l[31]&255)<<8};A.prototype.blocks=function(l,_,m){for(var s=this.fin?0:2048,M,p,I,L,V,ne,fe,he,te,xe,ue,ve,ge,me,_e,pe,de,ye,oe,le=this.h[0],be=this.h[1],se=this.h[2],Z=this.h[3],G=this.h[4],ie=this.h[5],J=this.h[6],ee=this.h[7],ae=this.h[8],Ee=this.h[9],Be=this.r[0],De=this.r[1],Ce=this.r[2],O=this.r[3],Te=this.r[4],Xe=this.r[5],Ze=this.r[6],Pe=this.r[7],Ye=this.r[8],Ke=this.r[9];m>=16;)M=l[_+0]&255|(l[_+1]&255)<<8,le+=M&8191,p=l[_+2]&255|(l[_+3]&255)<<8,be+=(M>>>13|p<<3)&8191,I=l[_+4]&255|(l[_+5]&255)<<8,se+=(p>>>10|I<<6)&8191,L=l[_+6]&255|(l[_+7]&255)<<8,Z+=(I>>>7|L<<9)&8191,V=l[_+8]&255|(l[_+9]&255)<<8,G+=(L>>>4|V<<12)&8191,ie+=V>>>1&8191,ne=l[_+10]&255|(l[_+11]&255)<<8,J+=(V>>>14|ne<<2)&8191,fe=l[_+12]&255|(l[_+13]&255)<<8,ee+=(ne>>>11|fe<<5)&8191,he=l[_+14]&255|(l[_+15]&255)<<8,ae+=(fe>>>8|he<<8)&8191,Ee+=he>>>5|s,te=0,xe=te,xe+=le*Be,xe+=be*(5*Ke),xe+=se*(5*Ye),xe+=Z*(5*Pe),xe+=G*(5*Ze),te=xe>>>13,xe&=8191,xe+=ie*(5*Xe),xe+=J*(5*Te),xe+=ee*(5*O),xe+=ae*(5*Ce),xe+=Ee*(5*De),te+=xe>>>13,xe&=8191,ue=te,ue+=le*De,ue+=be*Be,ue+=se*(5*Ke),ue+=Z*(5*Ye),ue+=G*(5*Pe),te=ue>>>13,ue&=8191,ue+=ie*(5*Ze),ue+=J*(5*Xe),ue+=ee*(5*Te),ue+=ae*(5*O),ue+=Ee*(5*Ce),te+=ue>>>13,ue&=8191,ve=te,ve+=le*Ce,ve+=be*De,ve+=se*Be,ve+=Z*(5*Ke),ve+=G*(5*Ye),te=ve>>>13,ve&=8191,ve+=ie*(5*Pe),ve+=J*(5*Ze),ve+=ee*(5*Xe),ve+=ae*(5*Te),ve+=Ee*(5*O),te+=ve>>>13,ve&=8191,ge=te,ge+=le*O,ge+=be*Ce,ge+=se*De,ge+=Z*Be,ge+=G*(5*Ke),te=ge>>>13,ge&=8191,ge+=ie*(5*Ye),ge+=J*(5*Pe),ge+=ee*(5*Ze),ge+=ae*(5*Xe),ge+=Ee*(5*Te),te+=ge>>>13,ge&=8191,me=te,me+=le*Te,me+=be*O,me+=se*Ce,me+=Z*De,me+=G*Be,te=me>>>13,me&=8191,me+=ie*(5*Ke),me+=J*(5*Ye),me+=ee*(5*Pe),me+=ae*(5*Ze),me+=Ee*(5*Xe),te+=me>>>13,me&=8191,_e=te,_e+=le*Xe,_e+=be*Te,_e+=se*O,_e+=Z*Ce,_e+=G*De,te=_e>>>13,_e&=8191,_e+=ie*Be,_e+=J*(5*Ke),_e+=ee*(5*Ye),_e+=ae*(5*Pe),_e+=Ee*(5*Ze),te+=_e>>>13,_e&=8191,pe=te,pe+=le*Ze,pe+=be*Xe,pe+=se*Te,pe+=Z*O,pe+=G*Ce,te=pe>>>13,pe&=8191,pe+=ie*De,pe+=J*Be,pe+=ee*(5*Ke),pe+=ae*(5*Ye),pe+=Ee*(5*Pe),te+=pe>>>13,pe&=8191,de=te,de+=le*Pe,de+=be*Ze,de+=se*Xe,de+=Z*Te,de+=G*O,te=de>>>13,de&=8191,de+=ie*Ce,de+=J*De,de+=ee*Be,de+=ae*(5*Ke),de+=Ee*(5*Ye),te+=de>>>13,de&=8191,ye=te,ye+=le*Ye,ye+=be*Pe,ye+=se*Ze,ye+=Z*Xe,ye+=G*Te,te=ye>>>13,ye&=8191,ye+=ie*O,ye+=J*Ce,ye+=ee*De,ye+=ae*Be,ye+=Ee*(5*Ke),te+=ye>>>13,ye&=8191,oe=te,oe+=le*Ke,oe+=be*Ye,oe+=se*Pe,oe+=Z*Ze,oe+=G*Xe,te=oe>>>13,oe&=8191,oe+=ie*Te,oe+=J*O,oe+=ee*Ce,oe+=ae*De,oe+=Ee*Be,te+=oe>>>13,oe&=8191,te=(te<<2)+te|0,te=te+xe|0,xe=te&8191,te=te>>>13,ue+=te,le=xe,be=ue,se=ve,Z=ge,G=me,ie=_e,J=pe,ee=de,ae=ye,Ee=oe,_+=16,m-=16;this.h[0]=le,this.h[1]=be,this.h[2]=se,this.h[3]=Z,this.h[4]=G,this.h[5]=ie,this.h[6]=J,this.h[7]=ee,this.h[8]=ae,this.h[9]=Ee},A.prototype.finish=function(l,_){var m=new Uint16Array(10),s,M,p,I;if(this.leftover){for(I=this.leftover,this.buffer[I++]=1;I<16;I++)this.buffer[I]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(s=this.h[1]>>>13,this.h[1]&=8191,I=2;I<10;I++)this.h[I]+=s,s=this.h[I]>>>13,this.h[I]&=8191;for(this.h[0]+=s*5,s=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=s,s=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=s,m[0]=this.h[0]+5,s=m[0]>>>13,m[0]&=8191,I=1;I<10;I++)m[I]=this.h[I]+s,s=m[I]>>>13,m[I]&=8191;for(m[9]-=8192,M=(s^1)-1,I=0;I<10;I++)m[I]&=M;for(M=~M,I=0;I<10;I++)this.h[I]=this.h[I]&M|m[I];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,p=this.h[0]+this.pad[0],this.h[0]=p&65535,I=1;I<8;I++)p=(this.h[I]+this.pad[I]|0)+(p>>>16)|0,this.h[I]=p&65535;l[_+0]=this.h[0]>>>0&255,l[_+1]=this.h[0]>>>8&255,l[_+2]=this.h[1]>>>0&255,l[_+3]=this.h[1]>>>8&255,l[_+4]=this.h[2]>>>0&255,l[_+5]=this.h[2]>>>8&255,l[_+6]=this.h[3]>>>0&255,l[_+7]=this.h[3]>>>8&255,l[_+8]=this.h[4]>>>0&255,l[_+9]=this.h[4]>>>8&255,l[_+10]=this.h[5]>>>0&255,l[_+11]=this.h[5]>>>8&255,l[_+12]=this.h[6]>>>0&255,l[_+13]=this.h[6]>>>8&255,l[_+14]=this.h[7]>>>0&255,l[_+15]=this.h[7]>>>8&255},A.prototype.update=function(l,_,m){var s,M;if(this.leftover){for(M=16-this.leftover,M>m&&(M=m),s=0;s<M;s++)this.buffer[this.leftover+s]=l[_+s];if(m-=M,_+=M,this.leftover+=M,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(m>=16&&(M=m-m%16,this.blocks(l,_,M),_+=M,m-=M),m){for(s=0;s<m;s++)this.buffer[this.leftover+s]=l[_+s];this.leftover+=m}};function n(l,_,m,s,M,p){var I=new A(p);return I.update(m,s,M),I.finish(l,_),0}function d(l,_,m,s,M,p){var I=new Uint8Array(16);return n(I,0,m,s,M,p),P(l,_,I,0)}function g(l,_,m,s,M){var p;if(m<32)return-1;for(U(l,0,_,0,m,s,M),n(l,16,l,32,m-32,l),p=0;p<16;p++)l[p]=0;return 0}function B(l,_,m,s,M){var p,I=new Uint8Array(32);if(m<32||(Q(I,0,32,s,M),d(_,16,_,32,m-32,I)!==0))return-1;for(U(l,0,_,0,m,s,M),p=0;p<32;p++)l[p]=0;return 0}function S(l,_){var m;for(m=0;m<16;m++)l[m]=_[m]|0}function z(l){var _,m,s=1;for(_=0;_<16;_++)m=l[_]+s+65535,s=Math.floor(m/65536),l[_]=m-s*65536;l[0]+=s-1+37*(s-1)}function N(l,_,m){for(var s,M=~(m-1),p=0;p<16;p++)s=M&(l[p]^_[p]),l[p]^=s,_[p]^=s}function D(l,_){var m,s,M,p=t(),I=t();for(m=0;m<16;m++)I[m]=_[m];for(z(I),z(I),z(I),s=0;s<2;s++){for(p[0]=I[0]-65517,m=1;m<15;m++)p[m]=I[m]-65535-(p[m-1]>>16&1),p[m-1]&=65535;p[15]=I[15]-32767-(p[14]>>16&1),M=p[15]>>16&1,p[14]&=65535,N(I,p,1-M)}for(m=0;m<16;m++)l[2*m]=I[m]&255,l[2*m+1]=I[m]>>8}function h(l,_){var m=new Uint8Array(32),s=new Uint8Array(32);return D(m,l),D(s,_),q(m,0,s,0)}function E(l){var _=new Uint8Array(32);return D(_,l),_[0]&1}function K(l,_){var m;for(m=0;m<16;m++)l[m]=_[2*m]+(_[2*m+1]<<8);l[15]&=32767}function j(l,_,m){for(var s=0;s<16;s++)l[s]=_[s]+m[s]}function W(l,_,m){for(var s=0;s<16;s++)l[s]=_[s]-m[s]}function re(l,_,m){var s,M,p=0,I=0,L=0,V=0,ne=0,fe=0,he=0,te=0,xe=0,ue=0,ve=0,ge=0,me=0,_e=0,pe=0,de=0,ye=0,oe=0,le=0,be=0,se=0,Z=0,G=0,ie=0,J=0,ee=0,ae=0,Ee=0,Be=0,De=0,Ce=0,O=m[0],Te=m[1],Xe=m[2],Ze=m[3],Pe=m[4],Ye=m[5],Ke=m[6],m0=m[7],h0=m[8],b0=m[9],p0=m[10],y0=m[11],E0=m[12],P0=m[13],k0=m[14],I0=m[15];s=_[0],p+=s*O,I+=s*Te,L+=s*Xe,V+=s*Ze,ne+=s*Pe,fe+=s*Ye,he+=s*Ke,te+=s*m0,xe+=s*h0,ue+=s*b0,ve+=s*p0,ge+=s*y0,me+=s*E0,_e+=s*P0,pe+=s*k0,de+=s*I0,s=_[1],I+=s*O,L+=s*Te,V+=s*Xe,ne+=s*Ze,fe+=s*Pe,he+=s*Ye,te+=s*Ke,xe+=s*m0,ue+=s*h0,ve+=s*b0,ge+=s*p0,me+=s*y0,_e+=s*E0,pe+=s*P0,de+=s*k0,ye+=s*I0,s=_[2],L+=s*O,V+=s*Te,ne+=s*Xe,fe+=s*Ze,he+=s*Pe,te+=s*Ye,xe+=s*Ke,ue+=s*m0,ve+=s*h0,ge+=s*b0,me+=s*p0,_e+=s*y0,pe+=s*E0,de+=s*P0,ye+=s*k0,oe+=s*I0,s=_[3],V+=s*O,ne+=s*Te,fe+=s*Xe,he+=s*Ze,te+=s*Pe,xe+=s*Ye,ue+=s*Ke,ve+=s*m0,ge+=s*h0,me+=s*b0,_e+=s*p0,pe+=s*y0,de+=s*E0,ye+=s*P0,oe+=s*k0,le+=s*I0,s=_[4],ne+=s*O,fe+=s*Te,he+=s*Xe,te+=s*Ze,xe+=s*Pe,ue+=s*Ye,ve+=s*Ke,ge+=s*m0,me+=s*h0,_e+=s*b0,pe+=s*p0,de+=s*y0,ye+=s*E0,oe+=s*P0,le+=s*k0,be+=s*I0,s=_[5],fe+=s*O,he+=s*Te,te+=s*Xe,xe+=s*Ze,ue+=s*Pe,ve+=s*Ye,ge+=s*Ke,me+=s*m0,_e+=s*h0,pe+=s*b0,de+=s*p0,ye+=s*y0,oe+=s*E0,le+=s*P0,be+=s*k0,se+=s*I0,s=_[6],he+=s*O,te+=s*Te,xe+=s*Xe,ue+=s*Ze,ve+=s*Pe,ge+=s*Ye,me+=s*Ke,_e+=s*m0,pe+=s*h0,de+=s*b0,ye+=s*p0,oe+=s*y0,le+=s*E0,be+=s*P0,se+=s*k0,Z+=s*I0,s=_[7],te+=s*O,xe+=s*Te,ue+=s*Xe,ve+=s*Ze,ge+=s*Pe,me+=s*Ye,_e+=s*Ke,pe+=s*m0,de+=s*h0,ye+=s*b0,oe+=s*p0,le+=s*y0,be+=s*E0,se+=s*P0,Z+=s*k0,G+=s*I0,s=_[8],xe+=s*O,ue+=s*Te,ve+=s*Xe,ge+=s*Ze,me+=s*Pe,_e+=s*Ye,pe+=s*Ke,de+=s*m0,ye+=s*h0,oe+=s*b0,le+=s*p0,be+=s*y0,se+=s*E0,Z+=s*P0,G+=s*k0,ie+=s*I0,s=_[9],ue+=s*O,ve+=s*Te,ge+=s*Xe,me+=s*Ze,_e+=s*Pe,pe+=s*Ye,de+=s*Ke,ye+=s*m0,oe+=s*h0,le+=s*b0,be+=s*p0,se+=s*y0,Z+=s*E0,G+=s*P0,ie+=s*k0,J+=s*I0,s=_[10],ve+=s*O,ge+=s*Te,me+=s*Xe,_e+=s*Ze,pe+=s*Pe,de+=s*Ye,ye+=s*Ke,oe+=s*m0,le+=s*h0,be+=s*b0,se+=s*p0,Z+=s*y0,G+=s*E0,ie+=s*P0,J+=s*k0,ee+=s*I0,s=_[11],ge+=s*O,me+=s*Te,_e+=s*Xe,pe+=s*Ze,de+=s*Pe,ye+=s*Ye,oe+=s*Ke,le+=s*m0,be+=s*h0,se+=s*b0,Z+=s*p0,G+=s*y0,ie+=s*E0,J+=s*P0,ee+=s*k0,ae+=s*I0,s=_[12],me+=s*O,_e+=s*Te,pe+=s*Xe,de+=s*Ze,ye+=s*Pe,oe+=s*Ye,le+=s*Ke,be+=s*m0,se+=s*h0,Z+=s*b0,G+=s*p0,ie+=s*y0,J+=s*E0,ee+=s*P0,ae+=s*k0,Ee+=s*I0,s=_[13],_e+=s*O,pe+=s*Te,de+=s*Xe,ye+=s*Ze,oe+=s*Pe,le+=s*Ye,be+=s*Ke,se+=s*m0,Z+=s*h0,G+=s*b0,ie+=s*p0,J+=s*y0,ee+=s*E0,ae+=s*P0,Ee+=s*k0,Be+=s*I0,s=_[14],pe+=s*O,de+=s*Te,ye+=s*Xe,oe+=s*Ze,le+=s*Pe,be+=s*Ye,se+=s*Ke,Z+=s*m0,G+=s*h0,ie+=s*b0,J+=s*p0,ee+=s*y0,ae+=s*E0,Ee+=s*P0,Be+=s*k0,De+=s*I0,s=_[15],de+=s*O,ye+=s*Te,oe+=s*Xe,le+=s*Ze,be+=s*Pe,se+=s*Ye,Z+=s*Ke,G+=s*m0,ie+=s*h0,J+=s*b0,ee+=s*p0,ae+=s*y0,Ee+=s*E0,Be+=s*P0,De+=s*k0,Ce+=s*I0,p+=38*ye,I+=38*oe,L+=38*le,V+=38*be,ne+=38*se,fe+=38*Z,he+=38*G,te+=38*ie,xe+=38*J,ue+=38*ee,ve+=38*ae,ge+=38*Ee,me+=38*Be,_e+=38*De,pe+=38*Ce,M=1,s=p+M+65535,M=Math.floor(s/65536),p=s-M*65536,s=I+M+65535,M=Math.floor(s/65536),I=s-M*65536,s=L+M+65535,M=Math.floor(s/65536),L=s-M*65536,s=V+M+65535,M=Math.floor(s/65536),V=s-M*65536,s=ne+M+65535,M=Math.floor(s/65536),ne=s-M*65536,s=fe+M+65535,M=Math.floor(s/65536),fe=s-M*65536,s=he+M+65535,M=Math.floor(s/65536),he=s-M*65536,s=te+M+65535,M=Math.floor(s/65536),te=s-M*65536,s=xe+M+65535,M=Math.floor(s/65536),xe=s-M*65536,s=ue+M+65535,M=Math.floor(s/65536),ue=s-M*65536,s=ve+M+65535,M=Math.floor(s/65536),ve=s-M*65536,s=ge+M+65535,M=Math.floor(s/65536),ge=s-M*65536,s=me+M+65535,M=Math.floor(s/65536),me=s-M*65536,s=_e+M+65535,M=Math.floor(s/65536),_e=s-M*65536,s=pe+M+65535,M=Math.floor(s/65536),pe=s-M*65536,s=de+M+65535,M=Math.floor(s/65536),de=s-M*65536,p+=M-1+37*(M-1),M=1,s=p+M+65535,M=Math.floor(s/65536),p=s-M*65536,s=I+M+65535,M=Math.floor(s/65536),I=s-M*65536,s=L+M+65535,M=Math.floor(s/65536),L=s-M*65536,s=V+M+65535,M=Math.floor(s/65536),V=s-M*65536,s=ne+M+65535,M=Math.floor(s/65536),ne=s-M*65536,s=fe+M+65535,M=Math.floor(s/65536),fe=s-M*65536,s=he+M+65535,M=Math.floor(s/65536),he=s-M*65536,s=te+M+65535,M=Math.floor(s/65536),te=s-M*65536,s=xe+M+65535,M=Math.floor(s/65536),xe=s-M*65536,s=ue+M+65535,M=Math.floor(s/65536),ue=s-M*65536,s=ve+M+65535,M=Math.floor(s/65536),ve=s-M*65536,s=ge+M+65535,M=Math.floor(s/65536),ge=s-M*65536,s=me+M+65535,M=Math.floor(s/65536),me=s-M*65536,s=_e+M+65535,M=Math.floor(s/65536),_e=s-M*65536,s=pe+M+65535,M=Math.floor(s/65536),pe=s-M*65536,s=de+M+65535,M=Math.floor(s/65536),de=s-M*65536,p+=M-1+37*(M-1),l[0]=p,l[1]=I,l[2]=L,l[3]=V,l[4]=ne,l[5]=fe,l[6]=he,l[7]=te,l[8]=xe,l[9]=ue,l[10]=ve,l[11]=ge,l[12]=me,l[13]=_e,l[14]=pe,l[15]=de}function ce(l,_){re(l,_,_)}function we(l,_){var m=t(),s;for(s=0;s<16;s++)m[s]=_[s];for(s=253;s>=0;s--)ce(m,m),s!==2&&s!==4&&re(m,m,_);for(s=0;s<16;s++)l[s]=m[s]}function Ae(l,_){var m=t(),s;for(s=0;s<16;s++)m[s]=_[s];for(s=250;s>=0;s--)ce(m,m),s!==1&&re(m,m,_);for(s=0;s<16;s++)l[s]=m[s]}function Me(l,_,m){var s=new Uint8Array(32),M=new Float64Array(80),p,I,L=t(),V=t(),ne=t(),fe=t(),he=t(),te=t();for(I=0;I<31;I++)s[I]=_[I];for(s[31]=_[31]&127|64,s[0]&=248,K(M,m),I=0;I<16;I++)V[I]=M[I],fe[I]=L[I]=ne[I]=0;for(L[0]=fe[0]=1,I=254;I>=0;--I)p=s[I>>>3]>>>(I&7)&1,N(L,V,p),N(ne,fe,p),j(he,L,ne),W(L,L,ne),j(ne,V,fe),W(V,V,fe),ce(fe,he),ce(te,L),re(L,ne,L),re(ne,V,he),j(he,L,ne),W(L,L,ne),ce(V,L),W(ne,fe,te),re(L,ne,u),j(L,L,fe),re(ne,ne,L),re(L,fe,te),re(fe,V,M),ce(V,he),N(L,V,p),N(ne,fe,p);for(I=0;I<16;I++)M[I+16]=L[I],M[I+32]=ne[I],M[I+48]=V[I],M[I+64]=fe[I];var xe=M.subarray(32),ue=M.subarray(16);return we(xe,xe),re(ue,ue,xe),D(l,ue),0}function Se(l,_){return Me(l,_,i)}function G0(l,_){return r(_,32),Se(l,_)}function We(l,_,m){var s=new Uint8Array(32);return Me(s,m,_),H(l,a,s,$)}var Oe=g,_0=B;function Ge(l,_,m,s,M,p){var I=new Uint8Array(32);return We(I,M,p),Oe(l,_,m,s,I)}function je(l,_,m,s,M,p){var I=new Uint8Array(32);return We(I,M,p),_0(l,_,m,s,I)}var $0=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Qe(l,_,m,s){for(var M=new Int32Array(16),p=new Int32Array(16),I,L,V,ne,fe,he,te,xe,ue,ve,ge,me,_e,pe,de,ye,oe,le,be,se,Z,G,ie,J,ee,ae,Ee=l[0],Be=l[1],De=l[2],Ce=l[3],O=l[4],Te=l[5],Xe=l[6],Ze=l[7],Pe=_[0],Ye=_[1],Ke=_[2],m0=_[3],h0=_[4],b0=_[5],p0=_[6],y0=_[7],E0=0;s>=128;){for(be=0;be<16;be++)se=8*be+E0,M[be]=m[se+0]<<24|m[se+1]<<16|m[se+2]<<8|m[se+3],p[be]=m[se+4]<<24|m[se+5]<<16|m[se+6]<<8|m[se+7];for(be=0;be<80;be++)if(I=Ee,L=Be,V=De,ne=Ce,fe=O,he=Te,te=Xe,xe=Ze,ue=Pe,ve=Ye,ge=Ke,me=m0,_e=h0,pe=b0,de=p0,ye=y0,Z=Ze,G=y0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=(O>>>14|h0<<18)^(O>>>18|h0<<14)^(h0>>>9|O<<23),G=(h0>>>14|O<<18)^(h0>>>18|O<<14)^(O>>>9|h0<<23),ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,Z=O&Te^~O&Xe,G=h0&b0^~h0&p0,ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,Z=$0[be*2],G=$0[be*2+1],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,Z=M[be%16],G=p[be%16],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,oe=ee&65535|ae<<16,le=ie&65535|J<<16,Z=oe,G=le,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=(Ee>>>28|Pe<<4)^(Pe>>>2|Ee<<30)^(Pe>>>7|Ee<<25),G=(Pe>>>28|Ee<<4)^(Ee>>>2|Pe<<30)^(Ee>>>7|Pe<<25),ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,Z=Ee&Be^Ee&De^Be&De,G=Pe&Ye^Pe&Ke^Ye&Ke,ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,xe=ee&65535|ae<<16,ye=ie&65535|J<<16,Z=ne,G=me,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=oe,G=le,ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,ne=ee&65535|ae<<16,me=ie&65535|J<<16,Be=I,De=L,Ce=V,O=ne,Te=fe,Xe=he,Ze=te,Ee=xe,Ye=ue,Ke=ve,m0=ge,h0=me,b0=_e,p0=pe,y0=de,Pe=ye,be%16===15)for(se=0;se<16;se++)Z=M[se],G=p[se],ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=M[(se+9)%16],G=p[(se+9)%16],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,oe=M[(se+1)%16],le=p[(se+1)%16],Z=(oe>>>1|le<<31)^(oe>>>8|le<<24)^oe>>>7,G=(le>>>1|oe<<31)^(le>>>8|oe<<24)^(le>>>7|oe<<25),ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,oe=M[(se+14)%16],le=p[(se+14)%16],Z=(oe>>>19|le<<13)^(le>>>29|oe<<3)^oe>>>6,G=(le>>>19|oe<<13)^(oe>>>29|le<<3)^(le>>>6|oe<<26),ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,M[se]=ee&65535|ae<<16,p[se]=ie&65535|J<<16;Z=Ee,G=Pe,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[0],G=_[0],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[0]=Ee=ee&65535|ae<<16,_[0]=Pe=ie&65535|J<<16,Z=Be,G=Ye,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[1],G=_[1],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[1]=Be=ee&65535|ae<<16,_[1]=Ye=ie&65535|J<<16,Z=De,G=Ke,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[2],G=_[2],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[2]=De=ee&65535|ae<<16,_[2]=Ke=ie&65535|J<<16,Z=Ce,G=m0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[3],G=_[3],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[3]=Ce=ee&65535|ae<<16,_[3]=m0=ie&65535|J<<16,Z=O,G=h0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[4],G=_[4],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[4]=O=ee&65535|ae<<16,_[4]=h0=ie&65535|J<<16,Z=Te,G=b0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[5],G=_[5],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[5]=Te=ee&65535|ae<<16,_[5]=b0=ie&65535|J<<16,Z=Xe,G=p0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[6],G=_[6],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[6]=Xe=ee&65535|ae<<16,_[6]=p0=ie&65535|J<<16,Z=Ze,G=y0,ie=G&65535,J=G>>>16,ee=Z&65535,ae=Z>>>16,Z=l[7],G=_[7],ie+=G&65535,J+=G>>>16,ee+=Z&65535,ae+=Z>>>16,J+=ie>>>16,ee+=J>>>16,ae+=ee>>>16,l[7]=Ze=ee&65535|ae<<16,_[7]=y0=ie&65535|J<<16,E0+=128,s-=128}return s}function ze(l,_,m){var s=new Int32Array(8),M=new Int32Array(8),p=new Uint8Array(256),I,L=m;for(s[0]=1779033703,s[1]=3144134277,s[2]=1013904242,s[3]=2773480762,s[4]=1359893119,s[5]=2600822924,s[6]=528734635,s[7]=1541459225,M[0]=4089235720,M[1]=2227873595,M[2]=4271175723,M[3]=1595750129,M[4]=2917565137,M[5]=725511199,M[6]=4215389547,M[7]=327033209,Qe(s,M,_,m),m%=128,I=0;I<m;I++)p[I]=_[L-m+I];for(p[m]=128,m=256-128*(m<112?1:0),p[m-9]=0,w(p,m-8,L/536870912|0,L<<3),Qe(s,M,p,m),I=0;I<8;I++)w(l,8*I,s[I],M[I]);return 0}function O0(l,_){var m=t(),s=t(),M=t(),p=t(),I=t(),L=t(),V=t(),ne=t(),fe=t();W(m,l[1],l[0]),W(fe,_[1],_[0]),re(m,m,fe),j(s,l[0],l[1]),j(fe,_[0],_[1]),re(s,s,fe),re(M,l[3],_[3]),re(M,M,c),re(p,l[2],_[2]),j(p,p,p),W(I,s,m),W(L,p,M),j(V,p,M),j(ne,s,m),re(l[0],I,L),re(l[1],ne,V),re(l[2],V,L),re(l[3],I,ne)}function qe(l,_,m){var s;for(s=0;s<4;s++)N(l[s],_[s],m)}function Fe(l,_){var m=t(),s=t(),M=t();we(M,_[2]),re(m,_[0],M),re(s,_[1],M),D(l,s),l[31]^=E(m)<<7}function S0(l,_,m){var s,M;for(S(l[0],y),S(l[1],x),S(l[2],x),S(l[3],y),M=255;M>=0;--M)s=m[M/8|0]>>(M&7)&1,qe(l,_,s),O0(_,l),O0(l,l),qe(l,_,s)}function Je(l,_){var m=[t(),t(),t(),t()];S(m[0],v),S(m[1],b),S(m[2],x),re(m[3],v,b),S0(l,m,_)}function f0(l,_,m){var s=new Uint8Array(64),M=[t(),t(),t(),t()],p;for(m||r(_,32),ze(s,_,32),s[0]&=248,s[31]&=127,s[31]|=64,Je(M,s),Fe(l,M),p=0;p<32;p++)_[p+32]=l[p];return 0}var F0=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ne(l,_){var m,s,M,p;for(s=63;s>=32;--s){for(m=0,M=s-32,p=s-12;M<p;++M)_[M]+=m-16*_[s]*F0[M-(s-32)],m=Math.floor((_[M]+128)/256),_[M]-=m*256;_[M]+=m,_[s]=0}for(m=0,M=0;M<32;M++)_[M]+=m-(_[31]>>4)*F0[M],m=_[M]>>8,_[M]&=255;for(M=0;M<32;M++)_[M]-=m*F0[M];for(s=0;s<32;s++)_[s+1]+=_[s]>>8,l[s]=_[s]&255}function u0(l){var _=new Float64Array(64),m;for(m=0;m<64;m++)_[m]=l[m];for(m=0;m<64;m++)l[m]=0;Ne(l,_)}function Q0(l,_,m,s){var M=new Uint8Array(64),p=new Uint8Array(64),I=new Uint8Array(64),L,V,ne=new Float64Array(64),fe=[t(),t(),t(),t()];ze(M,s,32),M[0]&=248,M[31]&=127,M[31]|=64;var he=m+64;for(L=0;L<m;L++)l[64+L]=_[L];for(L=0;L<32;L++)l[32+L]=M[32+L];for(ze(I,l.subarray(32),m+32),u0(I),Je(fe,I),Fe(l,fe),L=32;L<64;L++)l[L]=s[L];for(ze(p,l,m+64),u0(p),L=0;L<64;L++)ne[L]=0;for(L=0;L<32;L++)ne[L]=I[L];for(L=0;L<32;L++)for(V=0;V<32;V++)ne[L+V]+=p[L]*M[V];return Ne(l.subarray(32),ne),he}function l0(l,_){var m=t(),s=t(),M=t(),p=t(),I=t(),L=t(),V=t();return S(l[2],x),K(l[1],_),ce(M,l[1]),re(p,M,o),W(M,M,l[2]),j(p,l[2],p),ce(I,p),ce(L,I),re(V,L,I),re(m,V,M),re(m,m,p),Ae(m,m),re(m,m,M),re(m,m,p),re(m,m,p),re(l[0],m,p),ce(s,l[0]),re(s,s,p),h(s,M)&&re(l[0],l[0],C),ce(s,l[0]),re(s,s,p),h(s,M)?-1:(E(l[0])===_[31]>>7&&W(l[0],y,l[0]),re(l[3],l[0],l[1]),0)}function He(l,_,m,s){var M,p=new Uint8Array(32),I=new Uint8Array(64),L=[t(),t(),t(),t()],V=[t(),t(),t(),t()];if(m<64||l0(V,s))return-1;for(M=0;M<m;M++)l[M]=_[M];for(M=0;M<32;M++)l[M+32]=s[M];if(ze(I,l,m),u0(I),S0(L,V,I),Je(V,_.subarray(32)),O0(L,V),Fe(p,L),m-=64,q(_,0,p,0)){for(M=0;M<m;M++)l[M]=0;return-1}for(M=0;M<m;M++)l[M]=_[M+64];return m}var z0=32,a0=24,r0=32,q0=16,i0=32,s0=32,W0=32,e0=32,n0=32,N0=a0,o0=r0,x0=q0,D0=64,t0=32,Ve=64,rt=32,c0=64;e.lowlevel={crypto_core_hsalsa20:H,crypto_stream_xor:U,crypto_stream:Q,crypto_stream_salsa20_xor:Y,crypto_stream_salsa20:X,crypto_onetimeauth:n,crypto_onetimeauth_verify:d,crypto_verify_16:P,crypto_verify_32:q,crypto_secretbox:g,crypto_secretbox_open:B,crypto_scalarmult:Me,crypto_scalarmult_base:Se,crypto_box_beforenm:We,crypto_box_afternm:Oe,crypto_box:Ge,crypto_box_open:je,crypto_box_keypair:G0,crypto_hash:ze,crypto_sign:Q0,crypto_sign_keypair:f0,crypto_sign_open:He,crypto_secretbox_KEYBYTES:z0,crypto_secretbox_NONCEBYTES:a0,crypto_secretbox_ZEROBYTES:r0,crypto_secretbox_BOXZEROBYTES:q0,crypto_scalarmult_BYTES:i0,crypto_scalarmult_SCALARBYTES:s0,crypto_box_PUBLICKEYBYTES:W0,crypto_box_SECRETKEYBYTES:e0,crypto_box_BEFORENMBYTES:n0,crypto_box_NONCEBYTES:N0,crypto_box_ZEROBYTES:o0,crypto_box_BOXZEROBYTES:x0,crypto_sign_BYTES:D0,crypto_sign_PUBLICKEYBYTES:t0,crypto_sign_SECRETKEYBYTES:Ve,crypto_sign_SEEDBYTES:rt,crypto_hash_BYTES:c0,gf:t,D:o,L:F0,pack25519:D,unpack25519:K,M:re,A:j,S:ce,Z:W,pow2523:Ae,add:O0,set25519:S,modL:Ne,scalarmult:S0,scalarbase:Je};function d0(l,_){if(l.length!==z0)throw new Error("bad key size");if(_.length!==a0)throw new Error("bad nonce size")}function yt(l,_){if(l.length!==W0)throw new Error("bad public key size");if(_.length!==e0)throw new Error("bad secret key size")}function Ie(){for(var l=0;l<arguments.length;l++)if(!(arguments[l]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Re(l){for(var _=0;_<l.length;_++)l[_]=0}e.randomBytes=function(l){var _=new Uint8Array(l);return r(_,l),_},e.secretbox=function(l,_,m){Ie(l,_,m),d0(m,_);for(var s=new Uint8Array(r0+l.length),M=new Uint8Array(s.length),p=0;p<l.length;p++)s[p+r0]=l[p];return g(M,s,s.length,_,m),M.subarray(q0)},e.secretbox.open=function(l,_,m){Ie(l,_,m),d0(m,_);for(var s=new Uint8Array(q0+l.length),M=new Uint8Array(s.length),p=0;p<l.length;p++)s[p+q0]=l[p];return s.length<32||B(M,s,s.length,_,m)!==0?null:M.subarray(r0)},e.secretbox.keyLength=z0,e.secretbox.nonceLength=a0,e.secretbox.overheadLength=q0,e.scalarMult=function(l,_){if(Ie(l,_),l.length!==s0)throw new Error("bad n size");if(_.length!==i0)throw new Error("bad p size");var m=new Uint8Array(i0);return Me(m,l,_),m},e.scalarMult.base=function(l){if(Ie(l),l.length!==s0)throw new Error("bad n size");var _=new Uint8Array(i0);return Se(_,l),_},e.scalarMult.scalarLength=s0,e.scalarMult.groupElementLength=i0,e.box=function(l,_,m,s){var M=e.box.before(m,s);return e.secretbox(l,_,M)},e.box.before=function(l,_){Ie(l,_),yt(l,_);var m=new Uint8Array(n0);return We(m,l,_),m},e.box.after=e.secretbox,e.box.open=function(l,_,m,s){var M=e.box.before(m,s);return e.secretbox.open(l,_,M)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var l=new Uint8Array(W0),_=new Uint8Array(e0);return G0(l,_),{publicKey:l,secretKey:_}},e.box.keyPair.fromSecretKey=function(l){if(Ie(l),l.length!==e0)throw new Error("bad secret key size");var _=new Uint8Array(W0);return Se(_,l),{publicKey:_,secretKey:new Uint8Array(l)}},e.box.publicKeyLength=W0,e.box.secretKeyLength=e0,e.box.sharedKeyLength=n0,e.box.nonceLength=N0,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(l,_){if(Ie(l,_),_.length!==Ve)throw new Error("bad secret key size");var m=new Uint8Array(D0+l.length);return Q0(m,l,l.length,_),m},e.sign.open=function(l,_){if(Ie(l,_),_.length!==t0)throw new Error("bad public key size");var m=new Uint8Array(l.length),s=He(m,l,l.length,_);if(s<0)return null;for(var M=new Uint8Array(s),p=0;p<M.length;p++)M[p]=m[p];return M},e.sign.detached=function(l,_){for(var m=e.sign(l,_),s=new Uint8Array(D0),M=0;M<s.length;M++)s[M]=m[M];return s},e.sign.detached.verify=function(l,_,m){if(Ie(l,_,m),_.length!==D0)throw new Error("bad signature size");if(m.length!==t0)throw new Error("bad public key size");var s=new Uint8Array(D0+l.length),M=new Uint8Array(D0+l.length),p;for(p=0;p<D0;p++)s[p]=_[p];for(p=0;p<l.length;p++)s[p+D0]=l[p];return He(M,s,s.length,m)>=0},e.sign.keyPair=function(){var l=new Uint8Array(t0),_=new Uint8Array(Ve);return f0(l,_),{publicKey:l,secretKey:_}},e.sign.keyPair.fromSecretKey=function(l){if(Ie(l),l.length!==Ve)throw new Error("bad secret key size");for(var _=new Uint8Array(t0),m=0;m<_.length;m++)_[m]=l[32+m];return{publicKey:_,secretKey:new Uint8Array(l)}},e.sign.keyPair.fromSeed=function(l){if(Ie(l),l.length!==rt)throw new Error("bad seed size");for(var _=new Uint8Array(t0),m=new Uint8Array(Ve),s=0;s<32;s++)m[s]=l[s];return f0(_,m,!0),{publicKey:_,secretKey:m}},e.sign.publicKeyLength=t0,e.sign.secretKeyLength=Ve,e.sign.seedLength=rt,e.sign.signatureLength=D0,e.hash=function(l){Ie(l);var _=new Uint8Array(c0);return ze(_,l,l.length),_},e.hash.hashLength=c0,e.verify=function(l,_){return Ie(l,_),l.length===0||_.length===0||l.length!==_.length?!1:R(l,0,_,0,l.length)===0},e.setPRNG=function(l){r=l},function(){var l=typeof self<"u"?self.crypto||self.msCrypto:null;if(l&&l.getRandomValues){var _=65536;e.setPRNG(function(m,s){var M,p=new Uint8Array(s);for(M=0;M<s;M+=_)l.getRandomValues(p.subarray(M,M+Math.min(s-M,_)));for(M=0;M<s;M++)m[M]=p[M];Re(p)})}else typeof ln<"u"&&(l=mr,l&&l.randomBytes&&e.setPRNG(function(m,s){var M,p=l.randomBytes(s);for(M=0;M<s;M++)m[M]=p[M];Re(p)}))}()})(f.exports?f.exports:self.nacl=self.nacl||{})})(Wn);var bc=Wn.exports;const Jt=nn(bc);class pc{string(e){let t;return typeof e=="object"&&e!==null?t=JSON.stringify(e):t=String(e),this.stringToUnicode(t.replace(/\//g,"\\/"))}stringToByte(e){const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}stringToUnicode(e){return e?Array.prototype.map.call(e,t=>{const r=t.charCodeAt(0).toString(16);return r.length>2?"\\u"+r:t}).join(""):""}byteToHex(e){return e?Array.prototype.map.call(e,t=>("0"+(t&255).toString(16)).slice(-2)).join("").toLowerCase():""}hexToByte(e){if(!e)return new Uint8Array;const t=[];for(let r=0,a=e.length;r<a;r+=2)t.push(parseInt(e.slice(r,r+2),16));return new Uint8Array(t)}isHex(e){return typeof e!="string"?!1:/^[0-9a-fA-F]+$/.test(e)&&e.length%2===0}}const L0=new pc;class yc{string(e){return L0.string(e)}crypto(e,t){return Mt[e](t).toString(Mt.enc.Hex)}hash(e){return this.crypto("SHA256",this.string(e))}shortHash(e){return this.crypto("RIPEMD160",this.hash(e))}checksum(e){return this.hash(this.hash(e)).slice(0,4)}idHash(e){const t=this.shortHash(e);return t+this.checksum(t)}isHex(e){return L0.isHex(e)}}const sr=new yc;class gc{constructor(){wt(this,"KEY_SIZE");wt(this,"SIGNATURE_SIZE");this.KEY_SIZE=64,this.SIGNATURE_SIZE=128}keyPair(){const e=Jt.sign.keyPair();return{private_key:L0.byteToHex(e.secretKey).slice(0,this.KEY_SIZE),public_key:L0.byteToHex(e.publicKey),address:this.address(L0.byteToHex(e.publicKey))}}privateKey(){return L0.byteToHex(Jt.sign.keyPair().secretKey).slice(0,this.KEY_SIZE)}publicKey(e){return L0.byteToHex(Jt.sign.keyPair.fromSeed(L0.hexToByte(e)).publicKey)}address(e){return sr.idHash(e)}signature(e,t){return L0.byteToHex(Jt.sign.detached(L0.stringToByte(sr.string(e)),L0.hexToByte(t+this.publicKey(t))))}signatureValidity(e,t,r){return r.length===this.SIGNATURE_SIZE&&sr.isHex(r)===!0&&Jt.sign.detached.verify(L0.stringToByte(sr.string(e)),L0.hexToByte(r),L0.hexToByte(t))}}const Ki=new gc;class mc{constructor(){wt(this,"ec");this.ec=new bn.ec("secp256k1")}xphereSign(e,t){return Ki.signature(e,t)}xphereVerify(e,t,r){return Ki.signatureValidity(e,t,r)}generateKeys(){const e=this.ec.genKeyPair(),t=e.getPrivate("hex"),r=e.getPublic("hex");return{privateKey:t,publicKey:r}}sign(e,t){return this.ec.keyFromPrivate(t,"hex").sign(e)}verify(e,t,r){return this.ec.keyFromPublic(r,"hex").verify(e,t)}encrypt(e,t){return Mt.AES.encrypt(e,t).toString()}decrypt(e,t){return Mt.AES.decrypt(e,t).toString(Mt.enc.Utf8)}}const _c=new mc,dt=Object.create(null);dt.open="0";dt.close="1";dt.ping="2";dt.pong="3";dt.message="4";dt.upgrade="5";dt.noop="6";const ur=Object.create(null);Object.keys(dt).forEach(f=>{ur[dt[f]]=f});const Rf={type:"error",data:"parser error"},jn=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yn=typeof ArrayBuffer=="function",Kn=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,Kf=({type:f,data:e},t,r)=>jn&&e instanceof Blob?t?r(e):Vi(e,r):Yn&&(e instanceof ArrayBuffer||Kn(e))?t?r(e):Vi(new Blob([e]),r):r(dt[f]+(e||"")),Vi=(f,e)=>{const t=new FileReader;return t.onload=function(){const r=t.result.split(",")[1];e("b"+(r||""))},t.readAsDataURL(f)};function Xi(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let wf;function Ac(f,e){if(jn&&f.data instanceof Blob)return f.data.arrayBuffer().then(Xi).then(e);if(Yn&&(f.data instanceof ArrayBuffer||Kn(f.data)))return e(Xi(f.data));Kf(f,!1,t=>{wf||(wf=new TextEncoder),e(wf.encode(t))})}const Zi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let f=0;f<Zi.length;f++)fr[Zi.charCodeAt(f)]=f;const Ec=f=>{let e=f.length*.75,t=f.length,r,a=0,i,y,x,u;f[f.length-1]==="="&&(e--,f[f.length-2]==="="&&e--);const o=new ArrayBuffer(e),c=new Uint8Array(o);for(r=0;r<t;r+=4)i=fr[f.charCodeAt(r)],y=fr[f.charCodeAt(r+1)],x=fr[f.charCodeAt(r+2)],u=fr[f.charCodeAt(r+3)],c[a++]=i<<2|y>>4,c[a++]=(y&15)<<4|x>>2,c[a++]=(x&3)<<6|u&63;return o},wc=typeof ArrayBuffer=="function",Vf=(f,e)=>{if(typeof f!="string")return{type:"message",data:Vn(f,e)};const t=f.charAt(0);return t==="b"?{type:"message",data:Bc(f.substring(1),e)}:ur[t]?f.length>1?{type:ur[t],data:f.substring(1)}:{type:ur[t]}:Rf},Bc=(f,e)=>{if(wc){const t=Ec(f);return Vn(t,e)}else return{base64:!0,data:f}},Vn=(f,e)=>{switch(e){case"blob":return f instanceof Blob?f:new Blob([f]);case"arraybuffer":default:return f instanceof ArrayBuffer?f:f.buffer}},Xn="",Cc=(f,e)=>{const t=f.length,r=new Array(t);let a=0;f.forEach((i,y)=>{Kf(i,!1,x=>{r[y]=x,++a===t&&e(r.join(Xn))})})},Mc=(f,e)=>{const t=f.split(Xn),r=[];for(let a=0;a<t.length;a++){const i=Vf(t[a],e);if(r.push(i),i.type==="error")break}return r};function Sc(){return new TransformStream({transform(f,e){Ac(f,t=>{const r=t.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const i=new DataView(a.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{a=new Uint8Array(9);const i=new DataView(a.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}f.data&&typeof f.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(t)})}})}let Bf;function or(f){return f.reduce((e,t)=>e+t.length,0)}function cr(f,e){if(f[0].length===e)return f.shift();const t=new Uint8Array(e);let r=0;for(let a=0;a<e;a++)t[a]=f[0][r++],r===f[0].length&&(f.shift(),r=0);return f.length&&r<f[0].length&&(f[0]=f[0].slice(r)),t}function Fc(f,e){Bf||(Bf=new TextDecoder);const t=[];let r=0,a=-1,i=!1;return new TransformStream({transform(y,x){for(t.push(y);;){if(r===0){if(or(t)<1)break;const u=cr(t,1);i=(u[0]&128)===128,a=u[0]&127,a<126?r=3:a===126?r=1:r=2}else if(r===1){if(or(t)<2)break;const u=cr(t,2);a=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(or(t)<8)break;const u=cr(t,8),o=new DataView(u.buffer,u.byteOffset,u.length),c=o.getUint32(0);if(c>Math.pow(2,21)-1){x.enqueue(Rf);break}a=c*Math.pow(2,32)+o.getUint32(4),r=3}else{if(or(t)<a)break;const u=cr(t,a);x.enqueue(Vf(i?u:Bf.decode(u),e)),r=0}if(a===0||a>f){x.enqueue(Rf);break}}}})}const Zn=4;function A0(f){if(f)return Dc(f)}function Dc(f){for(var e in A0.prototype)f[e]=A0.prototype[e];return f}A0.prototype.on=A0.prototype.addEventListener=function(f,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+f]=this._callbacks["$"+f]||[]).push(e),this};A0.prototype.once=function(f,e){function t(){this.off(f,t),e.apply(this,arguments)}return t.fn=e,this.on(f,t),this};A0.prototype.off=A0.prototype.removeListener=A0.prototype.removeAllListeners=A0.prototype.removeEventListener=function(f,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+f];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+f],this;for(var r,a=0;a<t.length;a++)if(r=t[a],r===e||r.fn===e){t.splice(a,1);break}return t.length===0&&delete this._callbacks["$"+f],this};A0.prototype.emit=function(f){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+f],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(t){t=t.slice(0);for(var r=0,a=t.length;r<a;++r)t[r].apply(this,e)}return this};A0.prototype.emitReserved=A0.prototype.emit;A0.prototype.listeners=function(f){return this._callbacks=this._callbacks||{},this._callbacks["$"+f]||[]};A0.prototype.hasListeners=function(f){return!!this.listeners(f).length};const Y0=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Gn(f,...e){return e.reduce((t,r)=>(f.hasOwnProperty(r)&&(t[r]=f[r]),t),{})}const Rc=Y0.setTimeout,Pc=Y0.clearTimeout;function kr(f,e){e.useNativeTimers?(f.setTimeoutFn=Rc.bind(Y0),f.clearTimeoutFn=Pc.bind(Y0)):(f.setTimeoutFn=Y0.setTimeout.bind(Y0),f.clearTimeoutFn=Y0.clearTimeout.bind(Y0))}const kc=1.33;function Ic(f){return typeof f=="string"?Tc(f):Math.ceil((f.byteLength||f.size)*kc)}function Tc(f){let e=0,t=0;for(let r=0,a=f.length;r<a;r++)e=f.charCodeAt(r),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(r++,t+=4);return t}function Oc(f){let e="";for(let t in f)f.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(f[t]));return e}function zc(f){let e={},t=f.split("&");for(let r=0,a=t.length;r<a;r++){let i=t[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}class qc extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class Xf extends A0{constructor(e){super(),this.writable=!1,kr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new qc(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Vf(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Oc(e);return t.length?"?"+t:""}}const Qn="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Pf=64,Nc={};let Gi=0,dr=0,Qi;function Ji(f){let e="";do e=Qn[f%Pf]+e,f=Math.floor(f/Pf);while(f>0);return e}function Jn(){const f=Ji(+new Date);return f!==Qi?(Gi=0,Qi=f):f+"."+Ji(Gi++)}for(;dr<Pf;dr++)Nc[Qn[dr]]=dr;let ea=!1;try{ea=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Lc=ea;function ta(f){const e=f.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Lc))return new XMLHttpRequest}catch{}if(!e)try{return new Y0[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Hc(){}const Uc=function(){return new ta({xdomain:!1}).responseType!=null}();class $c extends Xf{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||a!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Uc&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||t()})),this.writable||(r++,this.once("drain",function(){--r||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Mc(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Cc(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Jn()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new at(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(a,i)=>{this.onError("xhr post error",a,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,r)=>{this.onError("xhr poll error",t,r)}),this.pollXhr=e}}class at extends A0{constructor(e,t){super(),kr(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;const t=Gn(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const r=this.xhr=new ta(t);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let a in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(a)&&r.setRequestHeader(a,this.opts.extraHeaders[a])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var a;r.readyState===3&&((a=this.opts.cookieJar)===null||a===void 0||a.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(a){this.setTimeoutFn(()=>{this.onError(a)},0);return}typeof document<"u"&&(this.index=at.requestsCount++,at.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Hc,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete at.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}at.requestsCount=0;at.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",en);else if(typeof addEventListener=="function"){const f="onpagehide"in Y0?"pagehide":"unload";addEventListener(f,en,!1)}}function en(){for(let f in at.requests)at.requests.hasOwnProperty(f)&&at.requests[f].abort()}const Zf=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),hr=Y0.WebSocket||Y0.MozWebSocket,tn=!0,Wc="arraybuffer",rn=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class jc extends Xf{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=rn?{}:Gn(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=tn&&!rn?t?new hr(e,t):new hr(e):new hr(e,t,r)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;Kf(r,this.supportsBinary,i=>{const y={};try{tn&&this.ws.send(i)}catch{}a&&Zf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Jn()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!hr}}class Yc extends Xf{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const t=Fc(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),a=Sc();a.readable.pipeTo(e.writable),this.writer=a.writable.getWriter();const i=()=>{r.read().then(({done:x,value:u})=>{x||(this.onPacket(u),i())}).catch(x=>{})};i();const y={type:"open"};this.query.sid&&(y.data=`{"sid":"${this.query.sid}"}`),this.writer.write(y).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],a=t===e.length-1;this.writer.write(r).then(()=>{a&&Zf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const Kc={websocket:jc,webtransport:Yc,polling:$c},Vc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Xc=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kf(f){if(f.length>2e3)throw"URI too long";const e=f,t=f.indexOf("["),r=f.indexOf("]");t!=-1&&r!=-1&&(f=f.substring(0,t)+f.substring(t,r).replace(/:/g,";")+f.substring(r,f.length));let a=Vc.exec(f||""),i={},y=14;for(;y--;)i[Xc[y]]=a[y]||"";return t!=-1&&r!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Zc(i,i.path),i.queryKey=Gc(i,i.query),i}function Zc(f,e){const t=/\/{2,9}/g,r=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Gc(f,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,a,i){a&&(t[a]=i)}),t}let ra=class Ot extends A0{constructor(e,t={}){super(),this.binaryType=Wc,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=kf(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=kf(t.host).host),kr(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=zc(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Zn,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Kc[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Ot.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),r=!1;Ot.priorWebsocketSuccess=!1;const a=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",v=>{if(!r)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Ot.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=t.name,this.emitReserved("upgradeError",b)}}))};function i(){r||(r=!0,c(),t.close(),t=null)}const y=v=>{const b=new Error("probe error: "+v);b.transport=t.name,i(),this.emitReserved("upgradeError",b)};function x(){y("transport closed")}function u(){y("socket closed")}function o(v){t&&v.name!==t.name&&i()}const c=()=>{t.removeListener("open",a),t.removeListener("error",y),t.removeListener("close",x),this.off("close",u),this.off("upgrading",o)};t.once("open",a),t.once("error",y),t.once("close",x),this.once("close",u),this.once("upgrading",o),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(this.readyState="open",Ot.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const a=this.writeBuffer[r].data;if(a&&(t+=Ic(a)),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,a){if(typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){Ot.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const a=e.length;for(;r<a;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}};ra.protocol=Zn;function Qc(f,e="",t){let r=f;t=t||typeof location<"u"&&location,f==null&&(f=t.protocol+"//"+t.host),typeof f=="string"&&(f.charAt(0)==="/"&&(f.charAt(1)==="/"?f=t.protocol+f:f=t.host+f),/^(https?|wss?):\/\//.test(f)||(typeof t<"u"?f=t.protocol+"//"+f:f="https://"+f),r=kf(f)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(t&&t.port===r.port?"":":"+r.port),r}const Jc=typeof ArrayBuffer=="function",e1=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f.buffer instanceof ArrayBuffer,fa=Object.prototype.toString,t1=typeof Blob=="function"||typeof Blob<"u"&&fa.call(Blob)==="[object BlobConstructor]",r1=typeof File=="function"||typeof File<"u"&&fa.call(File)==="[object FileConstructor]";function Gf(f){return Jc&&(f instanceof ArrayBuffer||e1(f))||t1&&f instanceof Blob||r1&&f instanceof File}function lr(f,e){if(!f||typeof f!="object")return!1;if(Array.isArray(f)){for(let t=0,r=f.length;t<r;t++)if(lr(f[t]))return!0;return!1}if(Gf(f))return!0;if(f.toJSON&&typeof f.toJSON=="function"&&arguments.length===1)return lr(f.toJSON(),!0);for(const t in f)if(Object.prototype.hasOwnProperty.call(f,t)&&lr(f[t]))return!0;return!1}function f1(f){const e=[],t=f.data,r=f;return r.data=If(t,e),r.attachments=e.length,{packet:r,buffers:e}}function If(f,e){if(!f)return f;if(Gf(f)){const t={_placeholder:!0,num:e.length};return e.push(f),t}else if(Array.isArray(f)){const t=new Array(f.length);for(let r=0;r<f.length;r++)t[r]=If(f[r],e);return t}else if(typeof f=="object"&&!(f instanceof Date)){const t={};for(const r in f)Object.prototype.hasOwnProperty.call(f,r)&&(t[r]=If(f[r],e));return t}return f}function i1(f,e){return f.data=Tf(f.data,e),delete f.attachments,f}function Tf(f,e){if(!f)return f;if(f&&f._placeholder===!0){if(typeof f.num=="number"&&f.num>=0&&f.num<e.length)return e[f.num];throw new Error("illegal attachments")}else if(Array.isArray(f))for(let t=0;t<f.length;t++)f[t]=Tf(f[t],e);else if(typeof f=="object")for(const t in f)Object.prototype.hasOwnProperty.call(f,t)&&(f[t]=Tf(f[t],e));return f}const n1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],a1=5;var Ue;(function(f){f[f.CONNECT=0]="CONNECT",f[f.DISCONNECT=1]="DISCONNECT",f[f.EVENT=2]="EVENT",f[f.ACK=3]="ACK",f[f.CONNECT_ERROR=4]="CONNECT_ERROR",f[f.BINARY_EVENT=5]="BINARY_EVENT",f[f.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class s1{constructor(e){this.replacer=e}encode(e){return(e.type===Ue.EVENT||e.type===Ue.ACK)&&lr(e)?this.encodeAsBinary({type:e.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===Ue.BINARY_EVENT||e.type===Ue.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=f1(e),r=this.encodeAsString(t.packet),a=t.buffers;return a.unshift(r),a}}function fn(f){return Object.prototype.toString.call(f)==="[object Object]"}class Qf extends A0{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===Ue.BINARY_EVENT;r||t.type===Ue.BINARY_ACK?(t.type=r?Ue.EVENT:Ue.ACK,this.reconstructor=new o1(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Gf(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(Ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ue.BINARY_EVENT||r.type===Ue.BINARY_ACK){const i=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const y=e.substring(i,t);if(y!=Number(y)||e.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(y)}if(e.charAt(t+1)==="/"){const i=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););r.nsp=e.substring(i,t)}else r.nsp="/";const a=e.charAt(t+1);if(a!==""&&Number(a)==a){const i=t+1;for(;++t;){const y=e.charAt(t);if(y==null||Number(y)!=y){--t;break}if(t===e.length)break}r.id=Number(e.substring(i,t+1))}if(e.charAt(++t)){const i=this.tryParse(e.substr(t));if(Qf.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Ue.CONNECT:return fn(t);case Ue.DISCONNECT:return t===void 0;case Ue.CONNECT_ERROR:return typeof t=="string"||fn(t);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&n1.indexOf(t[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class o1{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=i1(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qf,Encoder:s1,get PacketType(){return Ue},protocol:a1},Symbol.toStringTag,{value:"Module"}));function et(f,e,t){return f.on(e,t),function(){f.off(e,t)}}const d1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ia extends A0{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[et(e,"open",this.onopen.bind(this)),et(e,"packet",this.onpacket.bind(this)),et(e,"error",this.onerror.bind(this)),et(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(d1.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const r={type:Ue.EVENT,data:t};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const y=this.ids++,x=t.pop();this._registerAckCallback(y,x),r.id=y}const a=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!a||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,t){var r;const a=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(a===void 0){this.acks[e]=t;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let x=0;x<this.sendBuffer.length;x++)this.sendBuffer[x].id===e&&this.sendBuffer.splice(x,1);t.call(this,new Error("operation has timed out"))},a),y=(...x)=>{this.io.clearTimeoutFn(i),t.apply(this,x)};y.withError=!0,this.acks[e]=y}emitWithAck(e,...t){return new Promise((r,a)=>{const i=(y,x)=>y?a(y):r(x);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...i)=>r!==this._queue[0]?void 0:(a!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(a)):(this._queue.shift(),t&&t(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ue.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(e);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(e);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...a){r||(r=!0,t.packet({type:Ue.ACK,id:e,data:a}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function Vt(f){f=f||{},this.ms=f.min||100,this.max=f.max||1e4,this.factor=f.factor||2,this.jitter=f.jitter>0&&f.jitter<=1?f.jitter:0,this.attempts=0}Vt.prototype.duration=function(){var f=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*f);f=Math.floor(e*10)&1?f+t:f-t}return Math.min(f,this.max)|0};Vt.prototype.reset=function(){this.attempts=0};Vt.prototype.setMin=function(f){this.ms=f};Vt.prototype.setMax=function(f){this.max=f};Vt.prototype.setJitter=function(f){this.jitter=f};class Of extends A0{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,kr(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((r=t.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Vt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const a=t.parser||c1;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ra(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const a=et(t,"open",function(){r.onopen(),e&&e()}),i=x=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",x),e?e(x):this.maybeReconnectOnOpen()},y=et(t,"error",i);if(this._timeout!==!1){const x=this._timeout,u=this.setTimeoutFn(()=>{a(),i(new Error("timeout")),t.close()},x);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(a),this.subs.push(y),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(et(e,"ping",this.onping.bind(this)),et(e,"data",this.ondata.bind(this)),et(e,"error",this.onerror.bind(this)),et(e,"close",this.onclose.bind(this)),et(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Zf(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new ia(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const er={};function xr(f,e){typeof f=="object"&&(e=f,f=void 0),e=e||{};const t=Qc(f,e.path||"/socket.io"),r=t.source,a=t.id,i=t.path,y=er[a]&&i in er[a].nsps,x=e.forceNew||e["force new connection"]||e.multiplex===!1||y;let u;return x?u=new Of(r,e):(er[a]||(er[a]=new Of(r,e)),u=er[a]),t.query&&!e.query&&(e.query=t.queryKey),u.socket(t.path,e)}Object.assign(xr,{Manager:Of,Socket:ia,io:xr,connect:xr});const Ct=class Ct{constructor(){wt(this,"socket");this.socket=xr("http://159.138.233.132:8080")}static getInstance(){return Ct.instance||(Ct.instance=new Ct),Ct.instance}};wt(Ct,"instance");let zf=Ct;class h1{constructor(){wt(this,"socketInstance");this.socketInstance=zf.getInstance()}joinRoom(e){this.socketInstance.socket.emit("joinRoom",e)}leaveRoom(e){this.socketInstance.socket.emit("leaveRoom",e)}confirmMessage(e,t){return this.socketInstance.socket.emit("confirmMessage",e,t)}onMessageReceived(e,t){e==="accountInfo"?this.socketInstance.socket.on("accountInfo",r=>{t(r)}):e==="requestMessage"?this.socketInstance.socket.on("requestMessage",r=>{t(r)}):e==="addressProvide"&&this.socketInstance.socket.on("addressProvide",r=>{t(r)})}offMessageReceived(e){e==="accountInfo"?this.socketInstance.socket.off("accountInfo"):e==="requestMessage"?this.socketInstance.socket.off("requestMessage"):e==="addressProvide"&&this.socketInstance.socket.off("addressProvide")}}const xt=new h1;class u1{isAccountCryptoType(e){return typeof e=="object"&&e!==null&&typeof e.signature=="string"&&typeof e.publicKey=="string"&&typeof e.address=="string"&&typeof e.etc=="string"}getAccountCrypto(){return new Promise((e,t)=>{xt.onMessageReceived("accountInfo",r=>{this.isAccountCryptoType(r)?e(r):t(new Error("Invalid account crypto"))})})}reciveRequest(){return new Promise((e,t)=>{xt.onMessageReceived("requestMessage",r=>{r.message==="Request Message"?e(!0):t(new Error("Request message is different"))})})}sendMessage(e,t){return new Promise((r,a)=>{xt.confirmMessage(e,t).connected?r():a(new Error("Send failed"))})}async qrLogin(e,t){try{if(await this.reciveRequest()){await this.sendMessage(e,t);const{publicKey:a,signature:i,address:y}=await this.getAccountCrypto();if(!_c.xphereVerify(t,a,i))throw new Error("Verification failed");return{address:y}}else throw new Error("Verification failed")}catch(r){return Promise.reject(r)}finally{xt.leaveRoom(e)}}}const l1=new u1;class x1{generateQrCode(e,t){const r=Mt.lib.WordArray.random(16).toString(Mt.enc.Hex);let a="";return e==="login"?a=`zigap://login?roomId=${r}&dapp=${t}`:e==="send"?a=`zigap://send?roomId=${r}&dapp=${t}`:e==="provide"&&(a=`zigap://provide?roomId=${r}&dapp=${t}`),xt.joinRoom(r),{qrCode:a,roomId:r}}}const na=new x1,v1=({dapp:f,sigMessage:e,validTime:t,onReceive:r,...a})=>{const[i,y]=K0.useState(!0),{qrCode:x,roomId:u}=na.generateQrCode("login",f);return K0.useEffect(()=>{const o=setTimeout(()=>{xt.leaveRoom(u),y(!1)},t*60*1e3);return()=>clearTimeout(o)},[u,t]),K0.useEffect(()=>{(async()=>{try{console.log("roomId",u);const v={isSuccess:!0,address:(await l1.qrLogin(u,e)).address};r(v)}catch{r({isSuccess:!1})}})()},[r,e]),i?vr.jsx(hn,{value:x,...a,imageSettings:{src:"/public/zigap-icon.svg",height:60,width:60,excavate:!1}}):vr.jsx("div",{children:"QR loading error"})};class b1{isAccountType(e){return typeof e=="object"&&e!==null&&typeof e.address=="string"}getAccount(){return new Promise((e,t)=>{xt.onMessageReceived("addressProvide",r=>{this.isAccountType(r)?e(r):t(new Error("Invalid address"))})})}async qrAddressProvide(e){try{return await this.getAccount()}catch(t){return Promise.reject(t)}finally{xt.leaveRoom(e)}}}const p1=new b1,y1=({dapp:f,validTime:e,onReceive:t,...r})=>{const[a,i]=K0.useState(!0),{qrCode:y,roomId:x}=na.generateQrCode("provide",f);return K0.useEffect(()=>{const u=setTimeout(()=>{xt.leaveRoom(x),i(!1)},e*60*1e3);return()=>clearTimeout(u)},[x,e]),K0.useEffect(()=>{(async()=>{try{const c={isSuccess:!0,address:(await p1.qrAddressProvide(x)).address};t(c)}catch{t({isSuccess:!1})}})()},[t]),a?vr.jsx(hn,{value:y,...r}):vr.jsx("div",{children:"QR loading error"})};exports.AddressProvideQR=y1;exports.LoginQR=v1;
|